summaryrefslogtreecommitdiffstats
path: root/org/madore/damlengine/TodoBodyElement.java
diff options
context:
space:
mode:
Diffstat (limited to 'org/madore/damlengine/TodoBodyElement.java')
-rw-r--r--org/madore/damlengine/TodoBodyElement.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/org/madore/damlengine/TodoBodyElement.java b/org/madore/damlengine/TodoBodyElement.java
index c2be164..c5cc6c8 100644
--- a/org/madore/damlengine/TodoBodyElement.java
+++ b/org/madore/damlengine/TodoBodyElement.java
@@ -22,7 +22,7 @@ public class TodoBodyElement extends TodoDefaultElement {
public void handleNodeOnly() {
if ( ! ( options instanceof TodoDamlElement.DamlOptions ) )
- throw new Error("body node can only be child of daml node");
+ throw new IllegalArgumentException("body node can only be child of daml node");
Element bodyNode = ctx.doc.createElementNS(DamlEngine.XHTML_NS, "body");
String lang = LangHelper.getLangNorec(node);
@@ -53,7 +53,7 @@ public class TodoBodyElement extends TodoDefaultElement {
if ( child.getNodeType() == Node.TEXT_NODE
|| child.getNodeType() == Node.CDATA_SECTION_NODE ) {
if ( ! Pattern.matches("^\\s*$",((CharacterData)child).getData()) )
- throw new Error("body element cannot contain text");
+ throw new IllegalArgumentException("body element cannot contain text");
}
bodyNode.appendChild(child);
if ( child.getNodeType() == Node.ELEMENT_NODE ) {