Package exceptions
Class Exception
- java.lang.Object
-
- java.lang.Throwable
-
- exceptions.Exception
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
EvaluationException,SemanticException
public abstract class Exception extends java.lang.ThrowableThe Exception class is an abstract class used to represent exceptions that occur during compilation.Children classes of Exception call the parent constructor when initialised, and the majority of object generation is performed here, which stores information about the exception that occurred.
- Since:
- 1.0
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Exception(ExceptionType exceptionType, java.lang.String message)Constructs an Exception object for storing information about an exception that occurred during compilation.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetMessage()Return the message for this Exception object.
-
-
-
Constructor Detail
-
Exception
public Exception(ExceptionType exceptionType, java.lang.String message)
Constructs an Exception object for storing information about an exception that occurred during compilation.To generate an Exception, the type of exception and a message detailing how it transpired must be defined.
- Parameters:
exceptionType- The type of exception, which is based on where in the compilation process it occurredmessage- The message detailing what caused the exception to occur
-
-
Method Detail
-
getMessage
public java.lang.String getMessage()
Return the message for this Exception object.This message contains information about the location the Exception occurred in the code, the ExceptionType, and the class in which it developed.
- Overrides:
getMessagein classjava.lang.Throwable- Returns:
- A String containing information about the exception
-
-