This is documentation for Mathematica 6, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)


returns the Java Exception object that was thrown in the most recent call from Mathematica to Java.
  • To use GetJavaException, you first need to load J/Link using Needs["JLink`"].
  • GetJavaException returns Null if no exception was thrown in the most recent call.
  • GetJavaException can be used in conjunction with $JavaExceptionHandler to implement a custom exception-handling scheme in Mathematica.