MapleException
Exception class used in Java External Calling and Java Open Maple
Description
Method Summary
The com.maplesoft.externalcall.MapleException class is an Exception subclass that can be used in Java External Call (see define_external) and Java Open Maple (see Java Open Maple).
In Java External Call, a Java method can throw a MapleException and Maple correctly converts the Java Exception into a Maple Exception. The MapleException constructor allows for a limited number of arguments to be passed into Maple along with the Exception method. This functionality is similar to error.
In Java Open Maple, most methods are declared to throw objects of type MapleException.
MapleException(MapleException e)
MapleException creates a new MapleException object from an existing MapleException object. The new MapleException is identical to the e.
MapleException(Exception e)
MapleException creates a new MapleException object from an existing Java Exception object. The message in the new MapleException is the result of calling e.getMessage(). The MapleException does not contain any data arguments.
MapleException(String msg)
MapleException creates a new MapleException. The message in the new MapleException is the value of msg. The MapleException does not contain any data arguments.
MapleException(String msg, Object o1)
MapleException creates a new MapleException. The message in the new MapleException is the value of msg. The Object o1 is a data argument that is displayed within the error message, replacing instances of %1. This functionality is similar to error.
MapleException(String msg, Object o1, Object o2)
MapleException creates a new MapleException. The message in the new MapleException is the value of msg. The Objects o1 and o2 are data arguments that are displayed within the error message, replacing instances of %1 and %2 respectively. This functionality is similar to error.
int getArgCount( )
The getArgCount member function returns the number of data arguments that MapleException stores.
int getArg(int i)
The getArg member function returns the data argument with index i that MapleException stores. The data element replacing instances of %1 is at index 0, and the one replacing instances of %2 is at index 1.
See Also
define_external
ExternalCalling/Java/MapleException/MapleException
OpenMaple
OpenMaple/Java/API
Download Help Document