Wolfram ResearchPRODUCTSPURCHASEFOR USERSCOMPANYOUR SITES
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.

Documentation / Mathematica / Add-ons & Links / J/Link / Part 2. Writing Java Programs That Use Mathematica / Overview of the Main J/Link Interfaces and Classes /

2.3.4 MathLinkException

MathLinkException is the exception class that is thrown by many of the methods in MathLink and KernelLink. The J/Link API uses exceptions to indicate errors, rather than function return values like the MathLink C API. In C, you write code that checks the return values like this:

    // C code

    if (!MLPutInteger(link, 42)) {

        // was error; print message and clean up.

    }

In J/Link, you wrap MathLink calls in a try block and catch MathLinkException.



Any questions about topics on this page? Click here to get an individual response.Buy NowMore Information


 © 2008 Wolfram Research, Inc.  Terms of Use  Privacy Policy | [ja] |
Sign up for our newsletter: