BioRuntimeException (BioJava-1.5-beta API)
Keywords: org.biojava.bio.BioRuntimeException class

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.biojava.bio
Class BioRuntimeException

    java.lang.Object
      java.lang.Throwable
          java.lang.Exception
              java.lang.RuntimeException
                  org.biojava.bio.BioRuntimeException

All Implemented Interfaces:
  Serializable

Direct Known Subclasses:
  IllegalAlignmentEditException

    public class BioRuntimeException

extends RuntimeException

A nestable biological exception.

In BioJava, checked exceptions are generally preferred to RuntimeExceptions, but RuntimeExceptions can be used as a fall-back if you are implementing an interface which doesn't support checked exceptions. If you do this, please document this clearly in the implementing class.

Since:
  1.0
Author:
  Matthew Pocock, Thomas Down
See Also:
  Serialized Form
For advanced users:
  Occasionaly methods will document that the object they return may emit BioRuntimeExceptions. If you know what you are doing, you can catch these and do something sensible with them. An example would be an iterator() method that returns an Iterator where next() could fail due to a database connection flaking out. This could raise a BioRuntimeException wrapping the real cause. It would then not be unreasonable for the code calling next() to catch this BioRuntimeException and extract the cause.
For developers:
  Occasionaly it is necisary to abuse the exception system by throwing BioError to get arround limitations in APIs that you do not control. For example, when implementing Iterator.next(), you may need to call a method that can fail. Catch the failure and throw it as a BioError. If you want people to handle this gracefully in their scripts, then document this behavior and hope they catch the error.

Constructor Summary
`BioRuntimeException()` Create a new BioRuntimeException.
`BioRuntimeException(String message)` Create a new BioRuntimeException with a message.
`BioRuntimeException(String message, Throwable ex)` Create a new BioRuntimeException with a cause and a message.
`BioRuntimeException(Throwable ex)` Create a new BioRuntimeException with a cause.
`BioRuntimeException(Throwable ex, String message)` Deprecated. use new BioRuntimeException(message, ex) instead

Method Summary

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`

Constructor Detail

### BioRuntimeException

    public BioRuntimeException(String message)

  Create a new BioRuntimeException with a message.

  Parameters:
    `message` - the message

### BioRuntimeException

    public BioRuntimeException(Throwable ex)

  Create a new BioRuntimeException with a cause.

  Parameters:
    `ex` - the Throwable that caused this BioRuntimeException

### BioRuntimeException

    public BioRuntimeException(Throwable ex,
                               String message)

  Deprecated. use new BioRuntimeException(message, ex) instead

  Create a new BioRuntimeException with a cause and a message.

  Parameters:
    `ex` - the Throwable that caused this BioRuntimeException
    `message` - the message

### BioRuntimeException

    public BioRuntimeException(String message,
                               Throwable ex)

  Create a new BioRuntimeException with a cause and a message.

  Parameters:
    `message` - the message
    `ex` - the Throwable that caused this BioRuntimeException

### BioRuntimeException

    public BioRuntimeException()

  Create a new BioRuntimeException.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD