HasExceptionThrown

PowerBuilder Native Interface

IPB_Session interface:

HasExceptionThrown method

Description

Checks for the existence of an exception that has been thrown but not cleared.

Syntax

HasExceptionThrown()

Return Values

pbboolean. Returns true if a PowerBuilder exception has been thrown but not cleared.

Examples

This example tests whether an exception has been thrown so it can be handled and cleared:

try
{
   session->InvokeObjectFunction(pbobj, mid, &ci);
   // Was PB exception thrown?
   if (session-> HasExceptionThrown())
   {
       // Handle PB exception
       session-> ClearException();
   }
}

See Also