swisseph
Class SwissephException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by swisseph.SwissephException
All Implemented Interfaces:
java.io.Serializable

public class SwissephException
extends java.lang.RuntimeException
implements java.io.Serializable

See Also:
Serialized Form

Field Summary
static int BEYOND_USER_TIME_LIMIT
          Error code, when a user requested time limit has been reached.
static int DAMAGED_FILE_ERROR
          Error code, when the file is damaged in any way, which normally means that the content is not what it is expected to be.
static int FILE_ERROR
          Any file error.
static int FILE_NOT_FOUND
          Error code, when the file could not be found.
static int FILE_OPEN_FAILED
          Error code, when the file could not be opened.
static int FILE_READ_ERROR
          Error code, when the file could not be read.
static int INVALID_DATE
          Error code, when the date is invalid Its current value is PARAM_ERROR + 16384.
static int INVALID_FILE_ERROR
          Error code, when the file is not a valid data file.
static int INVALID_FILE_NAME
          Error code for invalid filename.
static int INVALID_PARAMETER_COMBINATION
          Error code, when the parameter combination is invalid.
static int OUT_OF_TIME_RANGE
          Error code, when a calculation would be out of its supported time range.
static int PARAM_ERROR
          Error code, when a parameter is not valid.
static int UNDEFINED_ERROR
          Default error code, if no other code had been specified.
static int UNSPECIFIED_FILE_ERROR
          Unspecified file error.
static int UNSUPPORTED_OBJECT
          Error code, when the object is not supported or unknown.
static int USER_ERROR
          Error code, when a user requested limit has been reached.
 
Constructor Summary
SwissephException(double jdet, int type, int rc, java.lang.String s)
           
SwissephException(double jdet, int type, int rc, java.lang.StringBuffer sb)
           
SwissephException(double jdet, int type, java.lang.String s)
           
SwissephException(double jdet, java.lang.String s)
           
 
Method Summary
 double getJD()
          Returns the julian day number as ET of the current process.
 int getRC()
          Returns the return code from the underlying original C-source code, which is SweConst.ERR normally.
 int getType()
          Returns error type.
 
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

UNDEFINED_ERROR

public static final int UNDEFINED_ERROR
Default error code, if no other code had been specified. Its current value is '0'.

See Also:
Constant Field Values

FILE_ERROR

public static final int FILE_ERROR
Any file error. Its current value is 1.

See Also:
Constant Field Values

UNSPECIFIED_FILE_ERROR

public static final int UNSPECIFIED_FILE_ERROR
Unspecified file error. Its current value is FILE_ERROR + 2.

See Also:
FILE_ERROR, Constant Field Values

INVALID_FILE_NAME

public static final int INVALID_FILE_NAME
Error code for invalid filename. Its current value is FILE_ERROR + 4.

See Also:
FILE_ERROR, Constant Field Values

FILE_NOT_FOUND

public static final int FILE_NOT_FOUND
Error code, when the file could not be found. Its current value is FILE_ERROR + 8.

See Also:
FILE_ERROR, Constant Field Values

FILE_OPEN_FAILED

public static final int FILE_OPEN_FAILED
Error code, when the file could not be opened. Its current value is FILE_ERROR + 16.

See Also:
FILE_ERROR, Constant Field Values

FILE_READ_ERROR

public static final int FILE_READ_ERROR
Error code, when the file could not be read. Its current value is FILE_ERROR + 32.

See Also:
FILE_ERROR, Constant Field Values

DAMAGED_FILE_ERROR

public static final int DAMAGED_FILE_ERROR
Error code, when the file is damaged in any way, which normally means that the content is not what it is expected to be. Its current value is FILE_ERROR + 64.

See Also:
FILE_ERROR, Constant Field Values

INVALID_FILE_ERROR

public static final int INVALID_FILE_ERROR
Error code, when the file is not a valid data file. Its current value is FILE_ERROR + 128.

See Also:
FILE_ERROR, Constant Field Values

PARAM_ERROR

public static final int PARAM_ERROR
Error code, when a parameter is not valid. Its current value is 1024.

See Also:
Constant Field Values

OUT_OF_TIME_RANGE

public static final int OUT_OF_TIME_RANGE
Error code, when a calculation would be out of its supported time range. Its current value is PARAM_ERROR + 2048.

See Also:
PARAM_ERROR, Constant Field Values

UNSUPPORTED_OBJECT

public static final int UNSUPPORTED_OBJECT
Error code, when the object is not supported or unknown. Its current value is PARAM_ERROR + 4096.

See Also:
PARAM_ERROR, Constant Field Values

INVALID_PARAMETER_COMBINATION

public static final int INVALID_PARAMETER_COMBINATION
Error code, when the parameter combination is invalid. Its current value is PARAM_ERROR + 8192.

See Also:
PARAM_ERROR, Constant Field Values

INVALID_DATE

public static final int INVALID_DATE
Error code, when the date is invalid Its current value is PARAM_ERROR + 16384.

See Also:
PARAM_ERROR, Constant Field Values

USER_ERROR

public static final int USER_ERROR
Error code, when a user requested limit has been reached. Its current value is 262144.

See Also:
Constant Field Values

BEYOND_USER_TIME_LIMIT

public static final int BEYOND_USER_TIME_LIMIT
Error code, when a user requested time limit has been reached. Its current value is 524288.

See Also:
USER_ERROR, Constant Field Values
Constructor Detail

SwissephException

public SwissephException(double jdet,
                         int type,
                         int rc,
                         java.lang.StringBuffer sb)

SwissephException

public SwissephException(double jdet,
                         int type,
                         int rc,
                         java.lang.String s)

SwissephException

public SwissephException(double jdet,
                         int type,
                         java.lang.String s)

SwissephException

public SwissephException(double jdet,
                         java.lang.String s)
Method Detail

getJD

public double getJD()
Returns the julian day number as ET of the current process. May return Infinity, if no date is available.


getType

public int getType()
Returns error type.

Returns:
error type
See Also:
UNDEFINED_ERROR, FILE_ERROR, UNSPECIFIED_FILE_ERROR, INVALID_FILE_NAME, FILE_NOT_FOUND, FILE_OPEN_FAILED, FILE_READ_ERROR, DAMAGED_FILE_ERROR, INVALID_FILE_ERROR, PARAM_ERROR, OUT_OF_TIME_RANGE, UNSUPPORTED_OBJECT, INVALID_PARAMETER_COMBINATION, INVALID_DATE, USER_ERROR, BEYOND_USER_TIME_LIMIT

getRC

public int getRC()
Returns the return code from the underlying original C-source code, which is SweConst.ERR normally. You should not need to know this.

Returns:
original error code