errorOutput property
errorOutput: receives error messages from the runtime. (This happens via the reportError method, which is virtual; so if you want to catch the actual exceptions rather than get the error messages as strings, you can extend Interpreter and override that method.)
Implementation
TextOutputMethod? errorOutput;