Forum Discussion
In fact, we don't get a Standard error message from a runtime error.
The appropriate way to react on unsafe functionality is to use script error handling. In VB:
On Error Resume Next
' generate error
Blah!
log.Event "Error: " & err.Number, Err.Description
If err.Number = 500 Then log.Event "got that beast"
On Error GoTo 0
Additionally, it may be necessary to do TC error handling (in case Your code throws a TC error).
- tristaanogre8 years agoEsteemed Contributor
Yep. Good call. In JScript/JavaScript/CnScript it's try/catch. DelphiScript uses try/except. I think Python does as well.
What you can do, then, is in the exception handling part of things, call Log.Error and pass it an error message... you can then trap that with the OnLogError event if you want... or, simply, handle the problem in the catch/except block.