APLX Help : Help on APL language : System Functions & Variables : ⎕LE Last Exception
|
|||||||
![]() |
|
||||||
Not implemented for APL internal classes or system classes Syntax:
The system function The left argument is a character vector which specifies the external environment for which you want exception information, in the same format as for
Once obtained, the object reference to the exception can be retained: it is unaffected by any subsequent exceptions. If no exception has ever occurred in the specified environment the error message is an empty character vector and a NULL object reference is returned. Example using .NET⍝ Do something which causes an exception date←'.net' ⎕NEW 'System.DateTime' 2008 02 16 date.Year 2008 date.Year←2009 Property Year is read-only DOMAIN ERROR date.Year←2009 ^ ⍝ Use ⎕LE to investigate '.net' ⎕LE 0 Property Year is read-only exception←'.net' ⎕LE 1 exception.⎕CLASSREF {.net:Exception} exception.Message Property Year is read-only Example using Java⍝ Do something which causes an exception a←'java' ⎕NEW 'java.math.BigInteger' '123' a.testBit ¯3 Cannot call method JVM: Exception in thread "main" DOMAIN ERROR a.testBit ¯3 ^ ⍝ Use ⎕LE to investigate x←'java' ⎕LE 1 x.⎕ds java.lang.ArithmeticException: Negative bit address x.getStackTrace [java:StackTraceElement] x.getStackTrace.⎕DS [Ljava.lang.StackTraceElement;@ca0b6 (x.getStackTrace).toString java.math.BigInteger.testBit(Unknown Source) For the R interface, the right argument of 1 (exception object) is not supported, but the latest error message is. |
|||||||
APLX Help : Help on APL language : System Functions & Variables : ⎕LE Last Exception
|
Copyright © 1996-2010 MicroAPL Ltd