maxscript/kernel/exceptions.h File Reference
This method centralizes the handling of maxscript exceptions in c++ code.
It's typical usage looks like:
ScopedMaxScriptEvaluationContext scopedMaxScriptEvaluationContext; two_value_locals( thingValue, propNameValue ); try { ScopedSaveCurrentFrames scopedSaveCurrentFrames; vl.thingValue = InterfaceFunction::FPValue_to_val( thing ); vl.propNameValue = Name::intern( propName ); vl.thingValue = vl.thingValue->get_property( &vl.propNameValue, 1 ); vl.thingValue->to_fpvalue( retVal ); } catch (MAXScriptException& e) { ProcessMAXScriptException(e, _T("GetScriptedProperty"), false, false, true); } catch (...) { ProcessMAXScriptException(UnknownSystemException(), _T("GetScriptedProperty"), false, false, true); }
- Parameters
-
e | The maxscript exception to process |
caption | The string to be used in the title bar of the error message box, and is used as part of the verbose description of the exception. Can be null. |
displayErrorMessageBox | If true, an error message box is displayed (unless max is in quiet mode). |
showSourcePosition | If true, source position of error is shown in maxscript editor. |
isTerminalHandling | If true, terminal handling of the exception is occurring. If false, the catch will be rethrowing the exception. |
quietErrors | If true, error information is not written to Listener, a brief description of the exception and its source location is written to the log file. |