Catch exception thrown by parser