diff java/src/java/lang/exceptions.d @ 2:712ffca654f3

Moved java classes to their correct location
author Frank Benoit <benoit@tionex.de>
date Wed, 04 Mar 2009 21:41:18 +0100
parents
children f36c67707cb3
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/java/src/java/lang/exceptions.d	Wed Mar 04 21:41:18 2009 +0100
@@ -0,0 +1,77 @@
+module java.lang.exceptions;
+
+import java.lang.util;
+
+class ClassCastException : Exception {
+    this( String e = null ){
+        super(e);
+    }
+}
+
+class IllegalStateException : Exception {
+    this( String e = null ){
+        super(e);
+    }
+    this( Exception e ){
+        super(e.toString);
+    }
+}
+
+class IndexOutOfBoundsException : Exception {
+    this( String e = null){
+        super(e);
+    }
+}
+
+class InterruptedException : Exception {
+    this( String e = null ){
+        super(e);
+    }
+    this( Exception e ){
+        super(e.toString);
+    }
+}
+
+class NullPointerException : Exception {
+    this( String e = null ){
+        super(e);
+    }
+    this( Exception e ){
+        super(e.toString);
+    }
+}
+
+class NumberFormatException : IllegalArgumentException {
+    this( String e ){
+        super(e);
+    }
+    this( Exception e ){
+        super(e.toString);
+    }
+}
+
+class RuntimeException : Exception {
+    this( char[] file, long line, char[] msg = null){
+        super( msg, file, line );
+    }
+    this( String e = null){
+        super(e);
+    }
+    this( Exception e ){
+        super(e.toString);
+        next = e;
+    }
+    public Exception getCause() {
+        return next;
+    }
+}
+
+class UnsupportedOperationException : RuntimeException {
+    this( String e = null){
+        super(e);
+    }
+    this( Exception e ){
+        super(e.toString);
+    }
+}
+