company logo

Suppress OSI exceptions

Keywords:  exception class

The function allows suppressing exceptions of a given exception class. The exception class is passed as parameter to the function.

One cannot suppress specific exceptions in a exception class by the SuppressException() function. This is possible, only, by implementing an appropriate exception handler as shown in the example below. Here, language exceptions are not raised and will be ignored. Data exceptions are handled in the ON_ERROR block and all other exceptions are passed to the calling method.

{

process

SuppressException('LanguageException');

while ( Next() )

printf("The name of person %s is: %s\n", (string)pid, name);

on_error

switch ( ExceptionClass() )

{

case 'DataException' :

Message("Error reading person data");

ResetException();

resume;

default : break;

}

}