Created
March 2, 2012 06:59
-
-
Save ussy/1956354 to your computer and use it in GitHub Desktop.
include the line number in the error message for Thymeleaf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- AbstractNonValidatingSAXTemplateParser.java 2012-03-02 15:43:16.000000000 +0900 | |
+++ AbstractNonValidatingSAXTemplateParser.java 2012-03-02 15:42:53.000000000 +0900 | |
@@ -123,6 +123,9 @@ | |
throw new TemplateInputException("Exception parsing document", e); | |
} catch (final TemplateProcessingException e) { | |
throw e; | |
+ } catch(final SAXParseException e) { | |
+ final String message = String.format("Exception parsing document: template=%s, near line=%d, column=%d", documentName, e.getLineNumber(), e.getColumnNumber()); | |
+ throw new TemplateInputException(message, e); | |
} catch (final SAXException e) { | |
throw new TemplateInputException("Exception parsing document", e); | |
} finally { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment