catch and rethrow parse errors