Step 59 – LMSGetLastError, LMSGetErrorString and LMSGetDiagnostic

The three API functions that return information to the SCO can now be connected to the error code variable that I implemented in Step 58, and to the error messages that I set up in Step 57.

Here they are:

function LMSGetLastError() {
  return errorCode;
}

function LMSGetErrorString(thisErrorCode) {
  return errorMessages[thisErrorCode];
}

function LMSGetDiagnostic(thisErrorCode) {
  return errorMessages[thisErrorCode];
}

Pretty simple so far. Next step – testing whether variables are supported and, if so, are they readable and/or writeable.

This entry was posted in Run Time Environment. Bookmark the permalink.

1 Response to Step 59 – LMSGetLastError, LMSGetErrorString and LMSGetDiagnostic

  1. Steve Addison says:

    One quick note about this post. The SCORM 1.2 RTE specification allows the LMS developer to provide both an “error string” describing the error, and a more detailed, LMS-specific “diagnostic” message. For now, I’m simply going to use the error string text for both purposes. Time (and readers of this blog) will tell me if I need to develop more detailed diagnostic text.

Comments are closed.