Package com.upokecenter.numbers
Class ETrapException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- java.lang.ArithmeticException
-
- com.upokecenter.numbers.ETrapException
-
- All Implemented Interfaces:
java.io.Serializable
public final class ETrapException extends java.lang.ArithmeticExceptionException thrown for arithmetic trap errors. (The "E" stands for "extended", and has this prefix to group it with the other classes common to this library, particularly EDecimal, EFloat, and ERational.).- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ETrapException(int flag, EContext ctx, java.lang.Object result)Initializes a new instance of theETrapExceptionclass.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EContextgetContext()Gets the arithmetic context used during the operation that triggered the trap.intgetError()Gets the flag that specifies the kind of error (EContext.FlagXXX).java.lang.ObjectgetResult()Gets the defined result of the operation that caused the trap.
-
-
-
Constructor Detail
-
ETrapException
public ETrapException(int flag, EContext ctx, java.lang.Object result)Initializes a new instance of theETrapExceptionclass.- Parameters:
flag- The parameterflagis a 32-bit signed integer.ctx- The parameterctxis an EContext object.result- The parameterresultis an arbitrary object.
-
-
Method Detail
-
getContext
public final EContext getContext()
Gets the arithmetic context used during the operation that triggered the trap. May be null.- Returns:
- The arithmetic context used during the operation that triggered the trap. May be null.
-
getResult
public final java.lang.Object getResult()
Gets the defined result of the operation that caused the trap.- Returns:
- The defined result of the operation that caused the trap.
-
getError
public final int getError()
Gets the flag that specifies the kind of error (EContext.FlagXXX). This will only be one flag, such asFlagInexactor FlagSubnormal.- Returns:
- The flag that specifies the kind of error (EContext.FlagXXX). This
will only be one flag, such as.
FlagInexactor FlagSubnormal.
-
-