Go to: Synopsis. Return value. MEL examples.

Synopsis

getLastError

getLastError is NOT undoable, NOT queryable, and NOT 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

MEL examples

catchQuiet(`someUnknownCommand`);

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

// The error output will be stored in $lastError