company logo

try_catch - Enable try...catch exception handling

When this switch is set, try...catch handling is enabled for the class, i.e. each function executes the BEGINSEQ part in a try block. In case of an error or exception the code in the RECOVER block is executes (similar to the code in a catch block). The code of the RECOVER block, however, is not part of the catch block and corresponds to the finalize block. .

cd ...project-resource database

cc ODC_ImpClass

loc ...try/catch class

cc pfunctions

osi do

{

while ( Next )

while ( implementations.Next )

if ( implementations.code.Contains("return",false) )

Message("'return' found in function " + sys_ident + ", implementation " + implementations.sys_ident);

}

end

Notes:

When using try and catch, the code block (PROCESS or BEGINSEQ) must not contain any return -statement. Especially running an application under UNIX will cause problems, since the jump stack for exception handling will not be reduced in this case. One may run the example procedure for checking your code.

Type: logical