Raise errors from ABL handlers for .NET events
- Last Updated: March 16, 2021
- 1 minute read
- OpenEdge
- Version 13.0
- Documentation
While executing a .NET event handler, an unexpected system error condition could occur or the
ABL code might want to raise an application error. In either case, if an error is thrown out
of the handler block (either explicitly or by letting a raised error bubble up via an
UNDO, THROW directive), the AVM displays the error message to the default
output device. The AVM will not throw the error back to the .NET Common Language Runtime (CLR)
because doing so may cause unexpected behavior or the CLR may ignore the error. Alternatively,
the handler code can manage the error condition itself as appropriate, which may include
logging the error message or displaying a different error message. If any other handlers for
the event have not yet run, they will subsequently be run because .NET is not aware that an
error occurred.