Reference Manual: DSL errorStringHandler
From DSL
This class stores error conditions and their associated error strings that can occur while using SMILE. Not all the errors are logged. Only those we believe are "important" enough to warn the user (like, for instance, when SMILE is reading a file and encounters a syntactical error). You can use this handler to obtain more information about the errors encountered.
Currently there is just one global instance of this class. SMILE will log there all the errors it encounters (no matter how may networks you have). This may change in the future so each network will have its own DSL_errorStringHandler instance. We recommend to access the error handler through the network method ErrorHandler.
Methods
- int GetNumberOfErrors(void)
Returns the number of errors logged since the last call to Flush.
- void Flush(void)
Discards all previous errors. After a call to this method, GetNumberOfErrors will return 0.
- int GetError(int thisOne)
Returns the error code for the error specified in thisOne. Errors are logged as they occur so GetError(0) will return the first error encountered while GetError(number_Of_Errors-1) will return the most recent one. If there has been no errors or thisOne is not a valid index, this function will return DSL_OKAY.
- char *GetErrorMessage(int thisOne)
Returns the error message string that was logged with the error specified in thisOne. This string can be used for error output.
