Skip to content

Commit

Permalink
#107 messages capitalized
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed Aug 24, 2022
1 parent f1f8c65 commit 708195e
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 19 deletions.
6 changes: 3 additions & 3 deletions src/main/java/org/xembly/Arg.java
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public static String unescape(final String text)
final char[] chars = text.toCharArray();
if (chars.length < 2) {
throw new IllegalArgumentException(
"internal error, argument can't be shorter than 2 chars"
"Internal error, argument can't be shorter than 2 chars"
);
}
final int len = chars.length - 1;
Expand All @@ -95,7 +95,7 @@ public static String unescape(final String text)
++idx;
if (idx == chars.length) {
throw new XmlContentException(
"reached EOF while parsing XML symbol"
"Reached EOF while parsing XML symbol"
);
}
sbuf.append(chars[idx]);
Expand Down Expand Up @@ -158,7 +158,7 @@ private static char symbol(final String symbol) throws XmlContentException {
chr = '&';
} else {
throw new XmlContentException(
String.format("unknown XML symbol &%s;", symbol)
String.format("Unknown XML symbol &%s;", symbol)
);
}
return chr;
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/org/xembly/Directives.java
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ public static Iterable<Directive> copyOf(final Node node) {
default:
throw new IllegalArgumentException(
String.format(
"unsupported type %d of node %s",
"Unsupported type %d of node %s",
child.getNodeType(), child.getNodeName()
)
);
Expand Down Expand Up @@ -251,7 +251,7 @@ public Directives add(final Object name) {
} catch (final XmlContentException ex) {
throw new IllegalArgumentException(
String.format(
"failed to understand XML content, ADD(%s)",
"Failed to understand XML content, ADD(%s)",
name
),
ex
Expand Down Expand Up @@ -310,7 +310,7 @@ public Directives addIf(final Object name) {
} catch (final XmlContentException ex) {
throw new IllegalArgumentException(
String.format(
"failed to understand XML content, ADDIF(%s)",
"Failed to understand XML content, ADDIF(%s)",
name
),
ex
Expand Down Expand Up @@ -478,7 +478,7 @@ public Directives xpath(final Object path) {
} catch (final XmlContentException ex) {
throw new IllegalArgumentException(
String.format(
"failed to understand XML content, XPATH(%s)",
"Failed to understand XML content, XPATH(%s)",
path
),
ex
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/xembly/StrictDirective.java
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,14 @@ public Directive.Cursor exec(final Node dom,
if (cursor.isEmpty()) {
throw new ImpossibleModificationException(
String.format(
"no current nodes while %d expected", this.number
"No current nodes while %d expected", this.number
)
);
}
if (cursor.size() == 1) {
throw new ImpossibleModificationException(
String.format(
"one current node '%s' while strictly %d expected",
"One current node '%s' while strictly %d expected",
cursor.iterator().next().getNodeName(), this.number
)
);
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/xembly/UpDirective.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public Directive.Cursor exec(final Node dom,
if (parent == null) {
throw new ImpossibleModificationException(
String.format(
"there is no parent node of '%s' (%s), can't go UP",
"There is no parent node of '%s' (%s), can't go UP",
node.getNodeName(), node.getNodeType()
)
);
Expand Down
14 changes: 7 additions & 7 deletions src/main/java/org/xembly/Xembler.java
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public Node applyQuietly(final Node dom) {
} catch (final ImpossibleModificationException ex) {
throw new IllegalArgumentException(
String.format(
"failed to apply to DOM quietly: %s",
"Failed to apply to DOM quietly: %s",
this.directives
),
ex
Expand All @@ -153,7 +153,7 @@ public Node apply(final Node dom) throws ImpossibleModificationException {
cursor = dir.exec(dom, cursor, stack);
} catch (final ImpossibleModificationException ex) {
throw new ImpossibleModificationException(
String.format("directive #%d: %s", pos, dir),
String.format("Directive #%d: %s", pos, dir),
ex
);
} catch (final DOMException ex) {
Expand All @@ -178,7 +178,7 @@ public Document domQuietly() {
} catch (final ImpossibleModificationException ex) {
throw new IllegalStateException(
String.format(
"failed to create DOM quietly: %s",
"Failed to create DOM quietly: %s",
this.directives
),
ex
Expand All @@ -199,7 +199,7 @@ public Document dom() throws ImpossibleModificationException {
} catch (final ParserConfigurationException ex) {
throw new IllegalStateException(
String.format(
"failed to obtain a new DOM document from %s",
"Failed to obtain a new DOM document from %s",
Xembler.BFACTORY.getClass().getCanonicalName()
),
ex
Expand All @@ -220,7 +220,7 @@ public String xmlQuietly() {
} catch (final ImpossibleModificationException ex) {
throw new IllegalStateException(
String.format(
"failed to build XML quietly: %s",
"Failed to build XML quietly: %s",
this.directives
),
ex
Expand All @@ -241,7 +241,7 @@ public String xml() throws ImpossibleModificationException {
} catch (final TransformerConfigurationException ex) {
throw new IllegalStateException(
String.format(
"failed to create new Transformer at %s",
"Failed to create new Transformer at %s",
Xembler.TFACTORY.getClass().getCanonicalName()
),
ex
Expand All @@ -258,7 +258,7 @@ public String xml() throws ImpossibleModificationException {
} catch (final TransformerException ex) {
throw new IllegalArgumentException(
String.format(
"failed to transform DOM to text by %s",
"Failed to transform DOM to text by %s",
transformer.getClass().getCanonicalName()
),
ex
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/xembly/XpathDirective.java
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ private static Collection<Node> traditional(final String query,
);
} catch (final XPathExpressionException ex) {
throw new ImpossibleModificationException(
String.format("invalid XPath expr '%s'", query), ex
String.format("Invalid XPath expression '%s'", query), ex
);
}
XpathDirective.copyTo(list, targets);
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/xembly/XsetDirective.java
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public Directive.Cursor exec(final Node dom,
);
} catch (final XPathExpressionException ex) {
throw new ImpossibleModificationException(
String.format("invalid XPath expr '%s'", this.expr), ex
String.format("Invalid XPath expression '%s'", this.expr), ex
);
}
}
Expand Down

0 comments on commit 708195e

Please # to comment.