attempt to trap poskey errors and recover