com.floreysoft.jmte.ErrorHandler Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jmte Show documentation
Show all versions of jmte Show documentation
To build and locally install jar, javadoc and sources, please use:
mvn clean javadoc:jar source:jar install -Dmaven.test.skip=true
Tested on Maven 2.0.9, JDK 1.7
package com.floreysoft.jmte;
import java.util.Map;
import com.floreysoft.jmte.message.ParseException;
import com.floreysoft.jmte.token.Lexer;
import com.floreysoft.jmte.token.Token;
/**
* Interface used to handle errors while expanding a template.
*/
public interface ErrorHandler {
/**
* Handles an error while interpreting a template in an appropriate way.
* This might contain logging the error or even throwing an exception.
*
* @param messageKey
* key for the error message
* @param token
* the token this error occurred on
* @param parameters
* additional parameters to be filled into message or
* null if you do not have additional parameters
*/
public void error(String messageKey, Token token,
Map parameters) throws ParseException;
/**
* Handles an error while interpreting a template in an appropriate way.
* This might contain logging the error or even throwing an exception.
*
* @param messageKey
* key for the error message
* @param token
* the token this error occurred on
*/
public void error(String messageKey, Token token) throws ParseException;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy