Fix formatting of error messages from terminology server

This commit is contained in:
Grahame Grieve 2024-01-30 19:03:54 +11:00
parent 9760b4134a
commit e8f4bde1eb
4 changed files with 16 additions and 16 deletions

View File

@ -85,13 +85,13 @@ public class ResourceUtilities {
StringBuilder b = new StringBuilder();
for (OperationOutcomeIssueComponent t : error.getIssue())
if (t.getSeverity() == IssueSeverity.ERROR)
b.append("Error:" +gen(t.getDetails())+"\r\n");
b.append("Error: " +gen(t.getDetails())+"\r\n");
else if (t.getSeverity() == IssueSeverity.FATAL)
b.append("Fatal:" +gen(t.getDetails())+"\r\n");
b.append("Fatal: " +gen(t.getDetails())+"\r\n");
else if (t.getSeverity() == IssueSeverity.WARNING)
b.append("Warning:" +gen(t.getDetails())+"\r\n");
b.append("Warning: " +gen(t.getDetails())+"\r\n");
else if (t.getSeverity() == IssueSeverity.INFORMATION)
b.append("Information:" +gen(t.getDetails())+"\r\n");
b.append("Information: " +gen(t.getDetails())+"\r\n");
return b.toString();
}

View File

@ -81,13 +81,13 @@ public class ResourceUtilities {
if (first) first = false; else b.append("\r\n");
String txt = t.hasDiagnostics() ? t.getDiagnostics() : gen(t.getDetails());
if (t.getSeverity() == IssueSeverity.ERROR)
b.append("Error:" + txt);
b.append("Error: " + txt);
else if (t.getSeverity() == IssueSeverity.FATAL)
b.append("Fatal:" + txt);
b.append("Fatal: " + txt);
else if (t.getSeverity() == IssueSeverity.WARNING)
b.append("Warning:" + txt);
b.append("Warning: " + txt);
else if (t.getSeverity() == IssueSeverity.INFORMATION)
b.append("Information:" + txt);
b.append("Information: " + txt);
}
return b.toString();
}

View File

@ -79,13 +79,13 @@ public class ResourceUtilities {
StringBuilder b = new StringBuilder();
for (OperationOutcomeIssueComponent t : error.getIssue()) {
if (t.getSeverity() == IssueSeverity.ERROR) {
b.append("Error:" + gen(t.getDetails()) + "\r\n");
b.append("Error: " + gen(t.getDetails()) + "\r\n");
} else if (t.getSeverity() == IssueSeverity.FATAL) {
b.append("Fatal:" + gen(t.getDetails()) + "\r\n");
b.append("Fatal: " + gen(t.getDetails()) + "\r\n");
} else if (t.getSeverity() == IssueSeverity.WARNING) {
b.append("Warning:" + gen(t.getDetails()) + "\r\n");
b.append("Warning: " + gen(t.getDetails()) + "\r\n");
} else if (t.getSeverity() == IssueSeverity.INFORMATION) {
b.append("Information:" + gen(t.getDetails()) + "\r\n");
b.append("Information: " + gen(t.getDetails()) + "\r\n");
}
}
return b.toString();

View File

@ -79,13 +79,13 @@ public class ResourceUtilities {
StringBuilder b = new StringBuilder();
for (OperationOutcomeIssueComponent t : error.getIssue()) {
if (t.getSeverity() == IssueSeverity.ERROR) {
b.append("Error:" +gen(t.getDetails())+"\r\n");
b.append("Error: " +gen(t.getDetails())+"\r\n");
} else if (t.getSeverity() == IssueSeverity.FATAL) {
b.append("Fatal:" +gen(t.getDetails())+"\r\n");
b.append("Fatal: " +gen(t.getDetails())+"\r\n");
} else if (t.getSeverity() == IssueSeverity.WARNING) {
b.append("Warning:" +gen(t.getDetails())+"\r\n");
b.append("Warning: " +gen(t.getDetails())+"\r\n");
} else if (t.getSeverity() == IssueSeverity.INFORMATION) {
b.append("Information:" +gen(t.getDetails())+"\r\n");
b.append("Information: " +gen(t.getDetails())+"\r\n");
}
}
return b.toString();