company logo

Application :: setApplicationError - Set documented application error

The function allows setting an application error defined in the resource database by error number and passing variables defined in the error message.

Implementation details

Application  :: setApplicationError ( int32 iError, odaba::String &sClassName, odaba::String &sLocation, odaba::String &sParm1, odaba::String &sParm2, odaba::String &sParm3 )

The function allows setting a documented application error. When setting an error, error information is written to the error log file. In order to get more detailed error information, the log file entry shows the class producing the error, which has to be passed in sClassName, as well as the location within the class (line or function name) passed in sLocation.

In order to generate a proper error message, error variables might be passed which will replace the place holders %1, %2 and %3 as being set in the error message text (title).

Documented errors can be defined in the resource database in the error class (ODC_ErrorClass) p_err. Within the error class errors (ODC_Error) are identified by error number as being passed in iError.

  • iError - Error number

    The internal error number identifies an error within an error class. Errors might be documented in the error class within the resource database.

  • sClassName - Class name

    The class name is the name of an implementation class (usually) defined in the database. Class names must not exceed 40 characters.

    In order to pass no class name, an empty string ( String() ) might be passed.

  • sLocation - Location

    The location usually refers to the line position within a class source file or to the function name. In general, its up to the developer to decide what to display as location.

  • sParm1 - Parameter string
  • sParm2 - Parameter string
  • sParm3 - Parameter string