Skip to content

Method: NoBracketCloseException(Token, String)

1: package de.fhdw.wtf.common.exception.parser;
2:
3: import de.fhdw.wtf.common.token.Token;
4:
5: /**
6: * The {@link NoBracketCloseException} will be thrown if a {@link de.fhdw.wtf.common.token.symbols.BracketCloseToken} is
7: * expected, but an another Token was found.
8: *
9: */
10: public final class NoBracketCloseException extends AbstractParserException {
11:         
12:         /**
13:          * generated.
14:          */
15:         private static final long serialVersionUID = -5285157902168385536L;
16:         
17:         /**
18:          * Constructor of {@link NoBracketCloseException}.
19:          *
20:          * @param token
21:          * token
22:          * @param message
23:          * message
24:          */
25:         private NoBracketCloseException(final Token token, final String message) {
26:                 super(token, message);
27:         }
28:         
29:         /**
30:          * Creates a {@link NoBracketCloseException}-Object.
31:          *
32:          * @param token
33:          * token
34:          * @return The {@link NoBracketCloseException}-Object.
35:          */
36:         public static NoBracketCloseException create(final Token token) {
37:                 return new NoBracketCloseException(token,
38:                                 de.fhdw.wtf.common.constants.parser.ExceptionConstants.NO_BRACKET_CLOSE_EXCEPTION_MESSAGE);
39:         }
40:         
41: }