Toad World® Forums

EXCEPTION handling in CUSTOMISATION section

Hi there,

How do we use DBMS_OUTPUT.PUT_LINE in EXCEPTION section of CUSTOMISATION ??

Any sample code if available, please share.

Regards,

Amol Jaiswal

Hi Amol,
you need to specify the exception case, when your code should be invoked to successfully compile (notice the following working case “others”):

EXCEPTION
– Exception handling for this test case
when others then DBMS_OUTPUT.PUT_LINE(‘Exception in OTHER cases is handled’);
END Q##NEW_TEST_CASE_NAME;

Also please note:
The handling statement is applied to the exceptions that occur AFTER automatically generated test execution code. Basically you get an DBMS output only when an exception in the cleaning section occurs. Explicitly, I’d like to note that you won’t have DBMS output when an exception in the tested program occurs.
For a reference, please see the generated code on the Test Explorer - tab Program call.

Best regards,
Ferdinand