aboutsummaryrefslogtreecommitdiff
path: root/libjava/gnu/xml/dom/DomCharacterData.java
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/gnu/xml/dom/DomCharacterData.java')
-rw-r--r--libjava/gnu/xml/dom/DomCharacterData.java25
1 files changed, 12 insertions, 13 deletions
diff --git a/libjava/gnu/xml/dom/DomCharacterData.java b/libjava/gnu/xml/dom/DomCharacterData.java
index 48ccb82d638..e5cc231891d 100644
--- a/libjava/gnu/xml/dom/DomCharacterData.java
+++ b/libjava/gnu/xml/dom/DomCharacterData.java
@@ -38,8 +38,7 @@ exception statement from your version. */
package gnu.xml.dom;
import org.w3c.dom.CharacterData;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
+import org.w3c.dom.DOMException;
import org.w3c.dom.events.MutationEvent;
@@ -82,7 +81,7 @@ public abstract class DomCharacterData
{
if (isReadonly())
{
- throw new DomEx(DomEx.NO_MODIFICATION_ALLOWED_ERR);
+ throw new DomDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR);
}
String value = text + arg;
mutating(value);
@@ -98,12 +97,12 @@ public abstract class DomCharacterData
{
if (isReadonly())
{
- throw new DomEx(DomEx.NO_MODIFICATION_ALLOWED_ERR);
+ throw new DomDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR);
}
char[] raw = text.toCharArray();
if (offset < 0 || count < 0 || offset > raw.length)
{
- throw new DomEx(DomEx.INDEX_SIZE_ERR);
+ throw new DomDOMException(DOMException.INDEX_SIZE_ERR);
}
if ((offset + count) > raw.length)
{
@@ -125,7 +124,7 @@ public abstract class DomCharacterData
}
catch (IndexOutOfBoundsException x)
{
- throw new DomEx(DomEx.INDEX_SIZE_ERR);
+ throw new DomDOMException(DOMException.INDEX_SIZE_ERR);
}
}
@@ -164,7 +163,7 @@ public abstract class DomCharacterData
{
if (isReadonly())
{
- throw new DomEx(DomEx.NO_MODIFICATION_ALLOWED_ERR);
+ throw new DomDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR);
}
char[] raw = text.toCharArray();
char[] tmp = arg.toCharArray ();
@@ -182,7 +181,7 @@ public abstract class DomCharacterData
}
catch (IndexOutOfBoundsException x)
{
- throw new DomEx(DomEx.INDEX_SIZE_ERR);
+ throw new DomDOMException(DOMException.INDEX_SIZE_ERR);
}
}
@@ -195,14 +194,14 @@ public abstract class DomCharacterData
{
if (readonly)
{
- throw new DomEx(DomEx.NO_MODIFICATION_ALLOWED_ERR);
+ throw new DomDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR);
}
char[] raw = text.toCharArray();
// deleteData
if (offset < 0 || count < 0 || offset > raw.length)
{
- throw new DomEx(DomEx.INDEX_SIZE_ERR);
+ throw new DomDOMException(DOMException.INDEX_SIZE_ERR);
}
if ((offset + count) > raw.length)
{
@@ -228,7 +227,7 @@ public abstract class DomCharacterData
}
catch (IndexOutOfBoundsException x)
{
- throw new DomEx(DomEx.INDEX_SIZE_ERR);
+ throw new DomDOMException(DOMException.INDEX_SIZE_ERR);
}
}
@@ -241,7 +240,7 @@ public abstract class DomCharacterData
{
if (isReadonly())
{
- throw new DomEx (DomEx.NO_MODIFICATION_ALLOWED_ERR);
+ throw new DomDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR);
}
if (value == null)
{
@@ -276,7 +275,7 @@ public abstract class DomCharacterData
{
return text.substring(offset);
}
- throw new DomEx(DomEx.INDEX_SIZE_ERR);
+ throw new DomDOMException(DOMException.INDEX_SIZE_ERR);
}
}