Maple Professional
Maple Academic
Maple Student Edition
Maple Personal Edition
Maple Player
Maple Player for iPad
MapleSim Professional
MapleSim Academic
Maple T.A. - Testing & Assessment
Maple T.A. MAA Placement Test Suite
Möbius - Online Courseware
Machine Design / Industrial Automation
Aerospace
Vehicle Engineering
Robotics
Power Industries
System Simulation and Analysis
Model development for HIL
Plant Modeling for Control Design
Robotics/Motion Control/Mechatronics
Other Application Areas
Mathematics Education
Engineering Education
High Schools & Two-Year Colleges
Testing & Assessment
Students
Financial Modeling
Operations Research
High Performance Computing
Physics
Live Webinars
Recorded Webinars
Upcoming Events
MaplePrimes
Maplesoft Blog
Maplesoft Membership
Maple Ambassador Program
MapleCloud
Technical Whitepapers
E-Mail Newsletters
Maple Books
Math Matters
Application Center
MapleSim Model Gallery
User Case Studies
Exploring Engineering Fundamentals
Teaching Concepts with Maple
Maplesoft Welcome Center
Teacher Resource Center
Student Help Center
MapleException - Exception class used in Java External Calling and Java Open Maple
Description
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.
Method Summary
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