SBM ModScript Reference → Programming SBM ModScript → Shell Properties → Shell Property Descriptions → LastErrorMessage Shell Properties
LastErrorMessage shell property accessors provide a central, single text value to help identify "what went wrong" in certain functions. This is a mechanism to get an error message back to the script for complex actions like running transitions or REST calls.
value (input).
Example:
Shell.SetLastErrorMessage("Some error message");
string (output).
Example:
var errMsg = Shell.GetLastErrorMessage(); if ( !myRec.StartTransition( 7 ) ) { Ext.WriteStream( "Error occurred starting transition: " &&& Shell.GetLastErrorMessage() ); }
string (output).
Example:
Shell.ClearLastErrorMessage();
Copyright © 2007–2019 Micro Focus or one of its affiliates. All rights reserved.