Skip to content
This repository has been archived by the owner on May 7, 2020. It is now read-only.

Commit

Permalink
Improved formatting of position of validation errors (#3775)
Browse files Browse the repository at this point in the history
Signed-off-by: Kai Kreuzer <kai@openhab.org>
  • Loading branch information
kaikreuzer authored and sjsf committed Jun 30, 2017
1 parent 2565ad7 commit 6379979
Showing 1 changed file with 3 additions and 2 deletions.
Expand Up @@ -252,8 +252,9 @@ private String validateModel(String name, InputStream inputStream) throws IOExce
if (resource != null && !resource.getContents().isEmpty()) {
// Check for syntactical errors
for (Diagnostic diagnostic : resource.getErrors()) {
criticalErrors.append(MessageFormat.format("[{0},{1}]: {2}\n", diagnostic.getLine(),
diagnostic.getColumn(), diagnostic.getMessage()));
criticalErrors
.append(MessageFormat.format("[{0},{1}]: {2}\n", Integer.toString(diagnostic.getLine()),
Integer.toString(diagnostic.getColumn()), diagnostic.getMessage()));
}
if (criticalErrors.length() > 0) {
return criticalErrors.toString();
Expand Down

0 comments on commit 6379979

Please sign in to comment.