PowerBuilder · Exception

Throwable Root Object

What does Throwable Root Object mean in PowerBuilder?

Throwable is the common ancestor of every object that can appear in a THROW statement or be caught in a CATCH clause, including both the RuntimeError branch (system/unchecked errors) and the Exception branch (user-defined/checked errors). It supplies the shared Text/ClassDefinition properties and the GetMessage()/SetMessage() methods every exception object relies on.

Throwable Root ObjectPowerBuilder Classic · Appeon PowerBuilder

Condition

Throwable is the common ancestor of every object that can appear in a THROW statement or be caught in a CATCH clause, including both the RuntimeError branch (system/unchecked errors) and the Exception branch (user-defined/checked errors). It supplies the shared Text/ClassDefinition properties and the GetMessage()/SetMessage() methods every exception object relies on.

Fix

Design shared error-logging utility functions to accept a Throwable parameter so one routine can log both system RuntimeErrors and custom Exception objects uniformly. Don't try to instantiate or throw Throwable directly; throw one of its RuntimeError or Exception descendants instead.

Related exception