#include <ifnpub.h>
Class Description
- See also:
- Class FPInterfaceDesc, Function Publishing
System.
- Description:
- Function Publishing interface functions can now report fatal
error conditions to callers by using C++ exception-handling. This
base class, MAXException, can be thrown
directly, or subclassed as needed for error grouping. The class
contains a message buffer and an optional error code. You would
signal an error using the MAXException()
constructor and the C++ throw statement, as in the following
example:
...
if (discrim < 0.0) // oh-oh, not good
throw MAXException ("Unable to find
root.", -23);
...
This signals a fatal error with the message and code shown. If the
error occurs during a call to the function by MAXScript code, it
will be trapped by MAXScript and the error message will be
displayed and the running script will be terminated (but 3ds Max
will continue running). If the error occurs during a C++-level
call, typically the outer 3ds Max error catcher will catch and
report the error and then exit 3ds Max, or clients of the interface
can install their own catch code.
- Data Members:
- MSTR message;
The exception message.
int error_code;
The exception error code.
Constructor & Destructor Documentation
- Parameters:
- MCHAR* msg
The exception message.
int code=0
The exception error code.
- Default Implementation:
- {}
Member Data Documentation