selective error catching