View Javadoc
1   package org.bitbucket.jrsofty.parser.logging.api;
2   
3   /**
4    * The exception thrown when the token does not match.
5    * 
6    * @author jrsofty
7    *
8    */
9   public class TokenParseException extends Exception {
10  
11    private static final long serialVersionUID = 3200062093665668850L;
12  
13    public TokenParseException(final String failedToken, final String failedParserType,
14        final String regexPattern) {
15      super("The token " + failedToken + " could not be parsed by " + failedParserType + " using "
16          + regexPattern);
17    }
18  
19    public TokenParseException(final String failedToken, final String failedParserType,
20        final String regexPattern, final Throwable exception) {
21      super("The token " + failedToken + " could not be parsed by " + failedParserType + " using "
22          + regexPattern, exception);
23    }
24  }