Package org.biojava.utils
Class ChangeVetoException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.biojava.utils.ChangeVetoException
- All Implemented Interfaces:
Serializable
Exception which is thrown when a ChangeListener does not
wish a change to take place. Since BioJava 1.5 the
ChangeVetoException
has been changed to extend RuntimeException
. It is therefore an
unchecked exception.- Since:
- 1.1
- Author:
- Thomas Down, Matthew Pocock, Mark Schreiber
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionChangeVetoException
(String reason) Create an exception with a detail messageChangeVetoException
(String reason, Throwable cause) ChangeVetoException
(Throwable ex, String reason) Deprecated.use new ChangeVetoException(reason, ex);ChangeVetoException
(Throwable ex, ChangeEvent change) Propogate an exception without (additional) explanation.ChangeVetoException
(Throwable ex, ChangeEvent change, String reason) Propogate an exception, giving a detail messageChangeVetoException
(ChangeEvent change) Construct an exception to veto a change without explanation.ChangeVetoException
(ChangeEvent change, String reason) Construct an exception to veto a change for a specified reason. -
Method Summary
Modifier and TypeMethodDescriptionReturn the ChangeEvent which is being vetoed.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
ChangeVetoException
public ChangeVetoException() -
ChangeVetoException
Construct an exception to veto a change without explanation.- Parameters:
change
- An event which is being vetoed.
-
ChangeVetoException
Create an exception with a detail message- Parameters:
reason
- A detail message.
-
ChangeVetoException
Construct an exception to veto a change for a specified reason.- Parameters:
change
- An event which is being vetoed.reason
- A detail message.
-
ChangeVetoException
Propogate an exception without (additional) explanation.- Parameters:
ex
- A parent exceptionchange
- An event which is being vetoed.
-
ChangeVetoException
Deprecated.use new ChangeVetoException(reason, ex);Propogate an exception, giving a detail message- Parameters:
ex
- A parent exceptionreason
- A detail message.
-
ChangeVetoException
-
ChangeVetoException
Propogate an exception, giving a detail message- Parameters:
ex
- A parent exceptionchange
- An event which is being vetoed.reason
- A detail message.
-
-
Method Details
-
getChangeEvent
Return the ChangeEvent which is being vetoed.- Returns:
- The ChangeEvent value
-