Package net.ssehub.easy.basics.messages
Class AbstractException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- net.ssehub.easy.basics.messages.AbstractException
-
- All Implemented Interfaces:
java.io.Serializable,IIdentifiable
- Direct Known Subclasses:
ModelManagementException,RuleDescriptorException,VersionFormatException,VilException
public abstract class AbstractException extends java.lang.Exception implements IIdentifiable
A common exception with identifier for testing.- Author:
- Holger Eichelberger
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private intidstatic intID_AMBIGUOUSDefines an identifier for ambiguities.static intID_CANNOT_RESOLVEDefines an identifier if something cannot be resolved.static intID_INTERNALDefines an identifier for implementation problems.static intID_SEMANTICDefines an identifier for semantic problems.static intID_WARNINGIndicates a warning to be filtered out.
-
Constructor Summary
Constructors Constructor Description AbstractException(java.lang.String message, int id)Creates a buildlang exception based on a givenmessage.AbstractException(java.lang.String message, java.lang.Throwable cause, int id)Creates a expression exception from a message and an optional cause.AbstractException(AbstractException cause)Creates a known exception as cause.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetId()Returns the identifier.-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.ssehub.easy.basics.messages.IIdentifiable
getMessage
-
-
-
-
Field Detail
-
ID_INTERNAL
public static final int ID_INTERNAL
Defines an identifier for implementation problems.- See Also:
- Constant Field Values
-
ID_SEMANTIC
public static final int ID_SEMANTIC
Defines an identifier for semantic problems.- See Also:
- Constant Field Values
-
ID_CANNOT_RESOLVE
public static final int ID_CANNOT_RESOLVE
Defines an identifier if something cannot be resolved.- See Also:
- Constant Field Values
-
ID_AMBIGUOUS
public static final int ID_AMBIGUOUS
Defines an identifier for ambiguities.- See Also:
- Constant Field Values
-
ID_WARNING
public static final int ID_WARNING
Indicates a warning to be filtered out.- See Also:
- Constant Field Values
-
id
private int id
-
-
Constructor Detail
-
AbstractException
public AbstractException(java.lang.String message, int id)Creates a buildlang exception based on a givenmessage.- Parameters:
message- the message of the exceptionid- the identifier (see constants above)
-
AbstractException
public AbstractException(java.lang.String message, java.lang.Throwable cause, int id)Creates a expression exception from a message and an optional cause.- Parameters:
message- the message of the exceptioncause- the originally causing exceptionid- the identifier (see constants above)
-
AbstractException
public AbstractException(AbstractException cause)
Creates a known exception as cause. Note that the identification fromcauseis taken over as identification.- Parameters:
cause- the causing exception
-
-
Method Detail
-
getId
public int getId()
Returns the identifier. (for testing)- Specified by:
getIdin interfaceIIdentifiable- Returns:
- the identifier
-
-