GetLastError()
ts
GetLastError(): string;Returns the last error encountered by the server during the operation of the current session.
Example
ts
{
if (Session) {
var lc = Session.GetLastCommand();
var le = Session.GetLastError();
Log(lc + ' - ' + le); // Log command and error (ex: `GET /file.zip - Error 5: access denied`)
} else {
Log('Session object is not available.');
}
}