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:
java.io.Serializable
public class IllegalSymbolException extends BioException
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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description IllegalSymbolException(java.lang.String message)
Make the exception with a message.IllegalSymbolException(java.lang.Throwable cause, java.lang.String message)
IllegalSymbolException(java.lang.Throwable cause, Symbol sym, java.lang.String message)
IllegalSymbolException(Symbol sym, java.lang.String message)
Make the exception with a message and a symbol.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Symbol
getSymbol()
Retrieve the symbol that caused this exception, or null.
-
-
-
Constructor Detail
-
IllegalSymbolException
public IllegalSymbolException(java.lang.String message)
Make the exception with a message.
-
IllegalSymbolException
public IllegalSymbolException(Symbol sym, java.lang.String message)
Make the exception with a message and a symbol.
-
IllegalSymbolException
public IllegalSymbolException(java.lang.Throwable cause, java.lang.String message)
-
IllegalSymbolException
public IllegalSymbolException(java.lang.Throwable cause, Symbol sym, java.lang.String message)
-
-