Set the library error handling mode

saf_setProps_ErrorMode is a function defined in libprops.c.

Synopsis:

int saf_setProps_ErrorMode(SAF_LibProps *properties, SAF_ErrMode mode)

Formal Arguments:

  • properties: The library property list which will be modified by this function (See *Properties*).
  • mode: The new error handling mode. Valid values are SAF__ERRMODE_RETURN (the default) and SAF__ERRMODE_THROW.

Description: The library normally handles error conditions by causing the erring function to return a non-zero error number. However, the error mode can be set to SAF__ERRMODE_THROW which causes the erring function to throw an exception instead.

Preconditions:

  • properties must be a valid library properties handle. (low-cost)

Return Value: The constant SAF__SUCCESS is returned when this function is successful. Otherwise this function either returns an error number or throws an exception, depending on the value of the library’s error handling property.

Parallel Notes: This function can be called independently.

Known Bugs: This function sometimes returns an error instead of throwing an exception when the library error mode is SAF__ERRMODE_THROW.

See Also: