Package org.biojava.bio
Class BioError
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Error
-
- org.biojava.bio.BioError
-
- All Implemented Interfaces:
Serializable
public class BioError extends Error
A nestable biological error. Catch this whenever it, or one of it's sub-classes are thrown and you know what to do once you've got it. Note: in general, you should not be catching errors. However, there are cases where it is necisary e.g. for logging. You will nearly always want to either re-throw the Error, throw a new Error or exit the current thread. Throw this when something has gone wrong and in general people should not be handeling it.- Since:
- 1.0
- Author:
- Matthew Pocock
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description BioError()
Create a new BioError.BioError(String message)
Create a new BioError with a message.BioError(String message, Throwable ex)
Create a new BioError with a cause and a message.BioError(Throwable ex)
Create a new BioError with a cause.BioError(Throwable ex, String message)
Deprecated.Use BioError(message, ex) instead.
-
Method Summary
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
BioError
public BioError(String message)
Create a new BioError with a message.- Parameters:
message
- the message
-
BioError
public BioError(Throwable ex)
Create a new BioError with a cause.- Parameters:
ex
- the Throwable that caused this BioError
-
BioError
public BioError(Throwable ex, String message)
Deprecated.Use BioError(message, ex) instead.Create a new BioError with a cause and a message.- Parameters:
ex
- the Throwable that caused this BioErrormessage
- the message
-
BioError
public BioError(String message, Throwable ex)
Create a new BioError with a cause and a message.- Parameters:
message
- the messageex
- the Throwable that caused this BioError
-
BioError
public BioError()
Create a new BioError.
-
-