Skip to content

Method: getToken()

1: package de.fhdw.wtf.common.exception.parser;
2:
3: import de.fhdw.wtf.common.token.Token;
4:
5: /**
6: * {@link AbstractParserException} is the abstract Exception of the Parser. All Exceptions of the Parser should extends
7: * this Class.
8: *
9: */
10: public abstract class AbstractParserException extends Exception {
11:         
12:         /**
13:          * generated.
14:          */
15:         private static final long serialVersionUID = -3718305666599238665L;
16:         
17:         /**
18:          * Token.
19:          */
20:         private final Token token;
21:         
22:         /**
23:          * Constructor of {@link AbstractParserException}.
24:          *
25:          * @param token
26:          * token
27:          * @param message
28:          * message
29:          */
30:         protected AbstractParserException(final Token token, final String message) {
31:                 super(message + token.toString());
32:                 this.token = token;
33:         }
34:         
35:         /**
36:          * Returns the token.
37:          *
38:          * @return token
39:          */
40:         public Token getToken() {
41:                 return this.token;
42:         }
43:         
44: }