GetErrorString
Listed below is the syntax, description, parameter and return value for "GetErrorString."
Method Syntax: return_value = GetErrorString(parameter)
Description: The GetErrorString() function can be used to retrieve a textual description of the current error state. The function is used by a SCO to request the textual description for the error code specified by the value of the parameter. The API Instance shall be responsible for supporting the error codes identified in the SCORM Run-Time Environment document. This call has no effect on the current error state; it simply returns the requested information.
Parameter:
- parameter: Represents the characterstring of the error code (integer value) corresponding to an error message.
Return Value: The method shall return a textual message containing a description of the error code specified by the value of the parameter. The following requirements shall be adhered to for all return values:
- The return value shall be a characterstring that has a maximum length of 255 characters.
- SCORM makes no requirement on what the text of the characterstring shall contain. The error codes themselves are explicitly and exclusively defined. The textual description for the error code is LMS specific.
- If the requested error code is unknown by the learning management system (LMS), an empty characterstring ("") shall be returned. This is the only time that an empty characterstring shall be returned.