add an error catcher to avoid the lexer breaking the editor, and allow the repl to not compile with optimizatoins that break it