3ds Max C++ API Reference
|
#include "../ScripterExport.h"
#include "../../strclass.h"
#include "../../WindowsDefines.h"
#include "../foundation/ValueHolderMember.h"
Classes | |
class | MAXScriptException |
class | MAXScriptException::ScopedMXSCallstackCaptureDisable |
helper class for disabling mxs callstack capture if an exception is thrown. More... | |
class | MAXScriptException::ScopedCplusplusCallstackCaptureDisable |
helper class for disabling c++ callstack capture if a system exception is thrown. More... | |
class | MAXScriptRuntimeErrorException |
class | UnknownSystemException |
class | SignalException |
This is the exception that is thrown if the user breaks execution by pressing and holding the escape key. More... | |
class | CompileError |
class | SyntaxError |
class | TypeError |
class | NoMethodError |
class | AccessorError |
class | AssignToConstError |
class | ArgCountError |
class | RuntimeError |
class | UserThrownError |
class | DebuggerRuntimeError |
class | IncompatibleTypes |
class | ConversionError |
class | FunctionReturn |
class | LoopExit |
class | LoopContinue |
class | MaxShutdownException |
class | CallStackOverflowException |
Exception thrown when calling a scripted function with less than 256k program call stack remaining. More... | |
class | SecurityException |
Exception thrown when attempting to execute MAXScript commands that are disallowed by ISceneScriptSecurityManager. More... | |
Macros | |
#define | unimplemented(m, t) throw NoMethodError (m, t) |
Functions | |
__declspec (deprecated) extern MCHAR *null_string | |
ScripterExport void | ProcessMAXScriptException (MAXScriptException &e, const MCHAR *caption, bool displayErrorMessageBox, bool showSourcePosition, bool isTerminalHandling, bool quietErrors=false) |
These methods centralize the handling of maxscript exceptions in c++ code. | |
void | ProcessUnknownMAXScriptException (const MCHAR *caption, bool displayErrorMessageBox, bool showSourcePosition, bool isTerminalHandling, bool quietErrors=false) |
#define unimplemented | ( | m, | |
t | |||
) | throw NoMethodError (m, t) |
ScripterExport void ProcessMAXScriptException | ( | MAXScriptException & | e, |
const MCHAR * | caption, | ||
bool | displayErrorMessageBox, | ||
bool | showSourcePosition, | ||
bool | isTerminalHandling, | ||
bool | quietErrors = false |
||
) |
These methods centralize the handling of maxscript exceptions in c++ code.
Typical usage looks like:
ScopedMaxScriptEvaluationContext scopedMaxScriptEvaluationContext; MAXScript_TLS* _tls = scopedMaxScriptEvaluationContext.Get_TLS(); two_value_locals_tls( thingValue, propNameValue ); try { ScopedSaveCurrentFrames scopedSaveCurrentFrames(_tls); 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 (...) { ProcessUnknownMAXScriptException(_T("GetScriptedProperty"), false, false, true); }
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 Scripting 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. |
|
inline |