Package org.biojava.bio.symbol
Class IllegalSymbolException
java.lang.Object
java.lang.Throwable
java.lang.Exception
org.biojava.bio.BioException
org.biojava.bio.symbol.IllegalSymbolException
- All Implemented Interfaces:
Serializable
The exception to indicate that a symbol is not valid within a context.
The usual reason for throwing an IllegalSymbolException is that you are trying to add a symbol to a sequence with an alpabet that does not contain the symbol. This is the sequence/alphabet equivalent of a ClassCastException for objects.
Frequently, these excepions are actualy generated from Alphabet.validate.
- Author:
- Matthew Pocock
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionIllegalSymbolException
(String message) Make the exception with a message.IllegalSymbolException
(Throwable cause, String message) IllegalSymbolException
(Throwable cause, Symbol sym, String message) IllegalSymbolException
(Symbol sym, String message) Make the exception with a message and a symbol. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
IllegalSymbolException
Make the exception with a message. -
IllegalSymbolException
Make the exception with a message and a symbol. -
IllegalSymbolException
-
IllegalSymbolException
-
-
Method Details
-
getSymbol
Retrieve the symbol that caused this exception, or null.
-