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:
Serializable,IIdentifiable
- Direct Known Subclasses:
ModelManagementException,VersionFormatException
A common exception with identifier for testing.
- Author:
- Holger Eichelberger
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intstatic final intDefines an identifier for ambiguities.static final intDefines an identifier if something cannot be resolved.static final intDefines an identifier for implementation problems.static final intDefines an identifier for semantic problems.static final intIndicates a warning to be filtered out. -
Constructor Summary
ConstructorsConstructorDescriptionAbstractException(String message, int id) Creates a buildlang exception based on a givenmessage.AbstractException(String message, Throwable cause, int id) Creates a expression exception from a message and an optional cause.Creates a known exception as cause. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.ssehub.easy.basics.messages.IIdentifiable
getMessage
-
Field Details
-
ID_INTERNAL
public static final int ID_INTERNALDefines an identifier for implementation problems.- See Also:
-
ID_SEMANTIC
public static final int ID_SEMANTICDefines an identifier for semantic problems.- See Also:
-
ID_CANNOT_RESOLVE
public static final int ID_CANNOT_RESOLVEDefines an identifier if something cannot be resolved.- See Also:
-
ID_AMBIGUOUS
public static final int ID_AMBIGUOUSDefines an identifier for ambiguities.- See Also:
-
ID_WARNING
public static final int ID_WARNINGIndicates a warning to be filtered out.- See Also:
-
id
private int id
-
-
Constructor Details
-
AbstractException
Creates a buildlang exception based on a givenmessage.- Parameters:
message- the message of the exceptionid- the identifier (see constants above)
-
AbstractException
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
Creates a known exception as cause. Note that the identification fromcauseis taken over as identification.- Parameters:
cause- the causing exception
-
-
Method Details
-
getId
public int getId()Returns the identifier. (for testing)- Specified by:
getIdin interfaceIIdentifiable- Returns:
- the identifier
-