Accessors for class IliErrorMessage

Properties

Description

The IliErrorMessage class is used to describe errors that occur during program execution. Errors may originate from different sources, such as the database server, the database client library, the Rogue Wave Views Data Access library, or the application itself. Each error message holds an error code whose meaning depends on the layer that triggered the error, and some descriptive text.
new IliErrorMessage() 

Here is an example of using an IliErrorMessage object :
	function OnValidateRow(dataSource) {
	   if (dataSource.QTY.value < 0) {
	      var error = new IliErrorMessage();
	      error.message = "Quantity should be >= 0";
	      dataSource.addErrorMessage(error);
	      dataSource.dontValidateRow();
	   }

TypeNameDescriptionNotes
IntcodeContains the code of the error. Its interpretation depends on the origin.
StringmessageContains a descriptive message for the error.
IliErrorOriginoriginContains the origin of the error. The possible string values are:
  • UnknownOrigin

  • DbmsServer

  • DbmsClientAPI

  • DbLink

  • InForm

  • Application

StringprettyMessageContains a combination of the error origin, the error code, and the error message.read-only
IliErrorSeverityseverityContains the severity of the error. The possible string values are:
  • NotAnError

  • Warning

  • Error

CallbackIliErrorMessageAdds a global error sink. When an error occurs, it will be forwarded to this error sink.
The sink parameter can be either:
  • An IliErrorList object

         	var errList = new IliErrorList
        	IliErrorMessage.addErrorSink(errList);
    

  • An IliObserver object whose func property contains a Rogue Wave Views Script function having the following signature: fct(IliErrorMessage msg)

         	function OnError(errorMsg) {
         	   writeln(errorMsg.prettyMessage);
         	}
         	IliErrorMessage.addErrorSink(new IliObserver(OnError));
    
CallbackIliErrorMessageRemoves a global error sink.