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
errorCallBack - handle error output in OpenMaple
Calling Sequence
errorCallBack(data, offset, msg)
Parameters
data
-
user_data pointer passed to StartMaple (Long)
offset
integer
msg
error message (byte array pointer)
Description
This OpenMaple function is part of the MapleCallBack structure passed as an argument to StartMaple.
The errorCallBack function is called when an error occurs during parsing or processing.
The prototype for the function you can assign to the entry in the MapleCallBack must look like the following.
Sub ErrorCallBack(ByVal data As Long,
ByVal Offset As Integer,
ByVal Output As Long)
The offset parameter indicates the location of a parsing error. If offset >= 0, the error was detected at the specified offset in the string passed to EvalMapleStatement. If offset < 0, the error is not a parsing error; it is a computation error.
The msg parameter contains the text of the error message.
The data parameter contains the same data as passed to StartMaple in the user_data parameter.
If an errorCallBack function is not specified, error messages are sent to the textCallBack function, with the MAPLE_TEXT_ERROR tag.
Examples
Public Sub ErrorCallBack(ByVal data As Long, _
ByVal Offset As Integer, ByVal Output As Long)
MsgBox " at offset " + str(Offset) + " " + _
MaplePointerToString(Output), vbInformation, ""
End Sub
' assignment to MapleCallback entry
cb.lpErrorCallBack = GetProc(AddressOf ErrorCallBack)
' test statement that will invoke the ErrorCallBack
EvalMapleStatement kv, "error(""invalid argument: %1"",x+y);"
See Also
callBackCallBack, OpenMaple, OpenMaple/VB/API, OpenMaple/VB/Examples, queryInterrupt, readLineCallBack, redirectCallBack, StartMaple, statusCallBack, streamCallBack, textCallBack
Download Help Document