catch exception on syntax error in definitions