- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- javax0.jamal.api.BadSyntax
-
- javax0.jamal.api.BadSyntaxAt
-
- All Implemented Interfaces:
java.io.Serializable
public class BadSyntaxAt extends BadSyntax
This exception, as the name suggest, is thrown when the processor or a macro finds something it cannot interpret. The 'At' at the end of the name suggest that the exception contains aPosition
object that tells exactly which source file is the culprit and which line and character position is the place where the macro processor lost it's faith in you being able to craft syntactically correct macros.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description BadSyntaxAt()
BadSyntaxAt(java.lang.String message, Position pos)
BadSyntaxAt(java.lang.String message, Position pos, java.lang.Throwable cause)
BadSyntaxAt(BadSyntax bs, Position pos)
Convert aBadSyntax
exception thrown from a macro that has no idea where the actual source code is to aBadSyntaxAt
exception using the provided reference.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getMessage()
Position
getPosition()
-
Methods inherited from class javax0.jamal.api.BadSyntax
getParameters, parameter
-
-
-
-
Constructor Detail
-
BadSyntaxAt
public BadSyntaxAt()
-
BadSyntaxAt
public BadSyntaxAt(BadSyntax bs, Position pos)
Convert aBadSyntax
exception thrown from a macro that has no idea where the actual source code is to aBadSyntaxAt
exception using the provided reference.The new exception will inherit the message, the cause, the suppressed throwables and the stack trace of the original exception.
- Parameters:
bs
- the original exception that was caught and is to be transformed to this exceptionpos
- the position object denoting where the syntax error was actually detected
-
BadSyntaxAt
public BadSyntaxAt(java.lang.String message, Position pos)
-
BadSyntaxAt
public BadSyntaxAt(java.lang.String message, Position pos, java.lang.Throwable cause)
-
-
Method Detail
-
getPosition
public Position getPosition()
-
getMessage
public java.lang.String getMessage()
- Overrides:
getMessage
in classBadSyntax
-
-