Go to: Synopsis. Return value. MEL examples.

Synopsis

getLastError

getLastError is undoable, queryable, and editable.

This MEL-only command returns the last (most recent) error. If there was no prior error, then an empty string is returned.

Return value

string

In query mode, return type is based on queried flag.

MEL examples

catchQuiet(`someUnknownCommand`);

// To store the last (most recent) MEL error:
string $lastError=getLastError();

// The error output will be stored in $lastError