#include <xmog_exception.h>
Inheritance diagram for xmog_exception:


Public Member Functions | |
| void | get_message (xmog_base *msg, xmog_localenv *env=NULL) |
| Returns the exception instance's message object in the provided proxy instance. | |
| virtual char * | get_message_chars (xmog_localenv *env=NULL, xmog_base *enc=NULL) |
| Returns the error message for this instance. | |
| virtual unsigned short * | get_message_u16 (xmog_localenv *env=NULL) |
| Returns the error message for this instance. | |
| xmog_exception (jobject inst, xmog_flags flags) | |
| The constructor for a preexisting exception instance. | |
| xmog_exception () | |
| The default constructor. | |
Static Public Member Functions | |
| static void | throw_java_exception (xmog_exception *pe=NULL, const char *msg=NULL, xmog_localenv *env=NULL) |
| Throws a Java exception corresponding with the passed exception instance. | |
This class is mixed into all generated proxy exception types and therefore has to extend xmog_java_ref virtually. By mixing this type into all generated exception proxy types and by having the generic exception type implement this interface, we can allow the developer to catch all exceptions that are part of the framework (typed and generic) via the xmog_exception type.
A catch-all handler could look like this:
try { // do things that could throw exceptions (framework or proxy) } catch( xmog_exception & e ) { // get the exception message using the default encoding char * msg = e.get_message_chars(); // print it to the console if there is something to print if( msg ) cout << msg << endl; // release the message string xmog_util::setString( msg, NULL ); }
|
||||||||||||
|
The constructor for a preexisting exception instance.
|
|
||||||||||||
|
Returns the exception instance's message object in the provided proxy instance. This method is used internally by the .NET bindings.
|
|
||||||||||||
|
Returns the error message for this instance. The caller is responsible for cleaning up the returned string by calling xmog_util::free() or xmog_util::setString().
Reimplemented in xmog_exception_impl. |
|
|
Returns the error message for this instance. The caller is responsible for cleaning up the returned string by calling xmog_util::free() or xmog_util::setString().
Reimplemented in xmog_exception_impl. |
|
||||||||||||||||
|
Throws a Java exception corresponding with the passed exception instance.
If the passed exception instance is
|
1.4.1