summaryrefslogtreecommitdiff
path: root/gnu/classpath
diff options
context:
space:
mode:
authorAaron Luchko <aluchko@redhat.com>2005-08-12 22:34:57 +0000
committerAaron Luchko <aluchko@redhat.com>2005-08-12 22:34:57 +0000
commit45647db66e1ac59377648d7df637da87c2c28ca1 (patch)
tree9bf2dc465ec4a76e6fcbb5c1f3fdaca768beaa0a /gnu/classpath
parente27eea65dd809a3cc4f35960c9a2a21619187664 (diff)
downloadclasspath-45647db66e1ac59377648d7df637da87c2c28ca1.tar.gz
* gnu/classpath/jdwp/exception/JdwpInternalErrorException.java
(JdwpInternalErrorException): Added new constructor. * gnu/classpath/jdwp/util/Value.java (getUntaggedObj): Changed InvalidFieldException to JdwpInternalErrorException. (writeUntaggedValue): Likewise. (writeTaggedValue): Likewise. (writeValue): Likewise.
Diffstat (limited to 'gnu/classpath')
-rw-r--r--gnu/classpath/jdwp/exception/JdwpInternalErrorException.java9
-rw-r--r--gnu/classpath/jdwp/util/Value.java16
2 files changed, 17 insertions, 8 deletions
diff --git a/gnu/classpath/jdwp/exception/JdwpInternalErrorException.java b/gnu/classpath/jdwp/exception/JdwpInternalErrorException.java
index c022dc537..3cf8592f4 100644
--- a/gnu/classpath/jdwp/exception/JdwpInternalErrorException.java
+++ b/gnu/classpath/jdwp/exception/JdwpInternalErrorException.java
@@ -50,8 +50,13 @@ import gnu.classpath.jdwp.JdwpConstants;
public class JdwpInternalErrorException
extends JdwpException
{
- public JdwpInternalErrorException (Throwable cause)
+ public JdwpInternalErrorException(Throwable cause)
{
- super (JdwpConstants.Error.INTERNAL, cause);
+ super(JdwpConstants.Error.INTERNAL, cause);
+ }
+
+ public JdwpInternalErrorException(String msg)
+ {
+ super(JdwpConstants.Error.INTERNAL, msg);
}
}
diff --git a/gnu/classpath/jdwp/util/Value.java b/gnu/classpath/jdwp/util/Value.java
index de7194dc7..a4bd9b946 100644
--- a/gnu/classpath/jdwp/util/Value.java
+++ b/gnu/classpath/jdwp/util/Value.java
@@ -43,6 +43,7 @@ import gnu.classpath.jdwp.JdwpConstants;
import gnu.classpath.jdwp.exception.InvalidFieldException;
import gnu.classpath.jdwp.exception.JdwpException;
import gnu.classpath.jdwp.exception.JdwpInternalErrorException;
+import gnu.classpath.jdwp.exception.NotImplementedException;
import gnu.classpath.jdwp.id.ObjectId;
import java.io.DataOutputStream;
@@ -65,7 +66,7 @@ public class Value
* @throws InvalidFieldException
*/
public static void writeUntaggedValue(DataOutputStream os, Object obj)
- throws InvalidFieldException, IOException
+ throws JdwpException, IOException
{
writeValue(os, obj, false);
}
@@ -79,7 +80,7 @@ public class Value
* @throws InvalidFieldException
*/
public static void writeTaggedValue(DataOutputStream os, Object obj)
- throws InvalidFieldException, IOException
+ throws JdwpException, IOException
{
writeValue(os, obj, true);
}
@@ -96,7 +97,7 @@ public class Value
*/
private static void writeValue(DataOutputStream os, Object obj,
boolean tagged)
- throws IOException, InvalidFieldException
+ throws IOException, JdwpException
{
Class clazz = obj.getClass();
if (clazz.isPrimitive())
@@ -156,7 +157,8 @@ public class Value
}
else
{ // This shouldn't be possible
- throw new InvalidFieldException("Field has invalid primitive!");
+ throw new JdwpInternalErrorException(
+ "Field has invalid primitive!");
}
}
else
@@ -235,7 +237,8 @@ public class Value
return new byte[0];
else
{ // This shouldn't be possible
- throw new InvalidFieldException("Field has invalid primitive!");
+ throw new JdwpInternalErrorException(
+ "Field has invalid primitive!");
}
}
else
@@ -291,7 +294,8 @@ public class Value
ObjectId oid = Jdwp.getIdManager().readId(bb);
return oid.getObject();
default:
- throw new JdwpInternalErrorException("Could not find TAG:" + tag);
+ throw new NotImplementedException("Tag " + tag
+ + " is not implemented.");
}
}
}