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

public abstract class AbstractException extends Exception implements IIdentifiable
A common exception with identifier for testing.
Author:
Holger Eichelberger
See Also:
  • Field Details

    • ID_INTERNAL

      public static final int ID_INTERNAL
      Defines an identifier for implementation problems.
      See Also:
    • ID_SEMANTIC

      public static final int ID_SEMANTIC
      Defines an identifier for semantic problems.
      See Also:
    • ID_CANNOT_RESOLVE

      public static final int ID_CANNOT_RESOLVE
      Defines an identifier if something cannot be resolved.
      See Also:
    • ID_AMBIGUOUS

      public static final int ID_AMBIGUOUS
      Defines an identifier for ambiguities.
      See Also:
    • ID_WARNING

      public static final int ID_WARNING
      Indicates a warning to be filtered out.
      See Also:
    • id

      private int id
  • Constructor Details

    • AbstractException

      public AbstractException(String message, int id)
      Creates a buildlang exception based on a given message.
      Parameters:
      message - the message of the exception
      id - the identifier (see constants above)
    • AbstractException

      public AbstractException(String message, Throwable cause, int id)
      Creates a expression exception from a message and an optional cause.
      Parameters:
      message - the message of the exception
      cause - the originally causing exception
      id - the identifier (see constants above)
    • AbstractException

      public AbstractException(AbstractException cause)
      Creates a known exception as cause. Note that the identification from cause is taken over as identification.
      Parameters:
      cause - the causing exception
  • Method Details

    • getId

      public int getId()
      Returns the identifier. (for testing)
      Specified by:
      getId in interface IIdentifiable
      Returns:
      the identifier