catching error during evaluation