PowerBuilder · Exception

RuntimeError Base System Exception

What does RuntimeError Base System Exception mean in PowerBuilder?

RuntimeError is the base object type for all PowerBuilder unchecked runtime errors and is what the PBVM throws directly for built-in failures that have no more specific descendant class. Catching RuntimeError itself (rather than a subclass) intercepts any PBVM-generated error, including ones not covered by DivideByZeroError, NullObjectError, or the other named descendants.

RuntimeError Base System ExceptionPowerBuilder Classic · Appeon PowerBuilder

Condition

RuntimeError is the base object type for all PowerBuilder unchecked runtime errors and is what the PBVM throws directly for built-in failures that have no more specific descendant class. Catching RuntimeError itself (rather than a subclass) intercepts any PBVM-generated error, including ones not covered by DivideByZeroError, NullObjectError, or the other named descendants.

Fix

Use a catch-all CATCH (RuntimeError e) as the last block in a TRY statement to prevent unexpected PBVM errors from falling through to the Application object's SystemError event and terminating the session. Check TypeOf(e) inside the handler when different runtime error subtypes need different recovery logic.

Related exception