JEphem site
tig API
Build classes

jephem.astro.solarsystem
Class ComputationException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--jephem.astro.solarsystem.ComputationException
All Implemented Interfaces:
java.io.Serializable

public class ComputationException
extends java.lang.RuntimeException

Exception to throw when the computation of a planet can't be done correctly.
This exception may be thrown in two cases :

  • When the precision asked for the computation can't be reached.
  • When a computation is asked for a date that planetary theories can't handle.


  • A computationException is characterized by :
  • its type (precision or date limit);
  • the body index of the body whose computation raised the exception;
  • the julian day for which it occured.
  • See Also:
    Serialized Form

    Field Summary
    static int DATE_LIMIT_ERROR
              Constant to indicate that this exception is due to a date out of range problem.
    static int PRECISION_ERROR
              Constant to indicate that this exception is due to a precision problem.
     
    Constructor Summary
    ComputationException(int errorType, int bodyIndex, double julianDay, int timeFrame)
              Constructor
     
    Method Summary
     int getBodyIndex()
              Returns the body index of this exception.
     int getErrorType()
              Returns the error type of this exception.
     double getJulianDay(int timeFrame)
              Returns the julian day concerned by this exception.
     
    Methods inherited from class java.lang.Throwable
    fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
     
    Methods inherited from class java.lang.Object
    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
     

    Field Detail

    DATE_LIMIT_ERROR

    public static final int DATE_LIMIT_ERROR
    Constant to indicate that this exception is due to a date out of range problem.

    See Also:
    Constant Field Values

    PRECISION_ERROR

    public static final int PRECISION_ERROR
    Constant to indicate that this exception is due to a precision problem.

    See Also:
    Constant Field Values
    Constructor Detail

    ComputationException

    public ComputationException(int errorType,
                                int bodyIndex,
                                double julianDay,
                                int timeFrame)
    Constructor

    Parameters:
    errorType - To specify what caused this exception ; use constants of this class to specify it.
    bodyIndex - The body concerned by this exception.
    julianDay - The julian day for which this exception occured.
    timeFrame - The time frame used to express 'julianDay. Use TimeConstants for it.
    Method Detail

    getBodyIndex

    public int getBodyIndex()
    Returns the body index of this exception.


    getErrorType

    public int getErrorType()
    Returns the error type of this exception.


    getJulianDay

    public double getJulianDay(int timeFrame)
    Returns the julian day concerned by this exception.

    Parameters:
    timeFrame - The time frame (UTC or TT/TDB) in which the julian day must be returned ; use TimeConstants constants for it.

    JEphem site
    tig API
    Build classes