annotate base/src/java/lang/exceptions.d @ 98:48d4ee626868

rm databinding.observable seems to be duplicate, databinding.beans now building
author Frank Benoit <benoit@tionex.de>
date Wed, 22 Apr 2009 07:30:21 +0200
parents fcf926c91ca4
children 9f4c18c268b2
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2
712ffca654f3 Moved java classes to their correct location
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
1 module java.lang.exceptions;
712ffca654f3 Moved java classes to their correct location
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
2
712ffca654f3 Moved java classes to their correct location
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
3 import java.lang.util;
21
9b96950f2c3c the 'java' tree compiles on both D1-Tango and D2-Phobos
Frank Benoit <benoit@tionex.de>
parents: 6
diff changeset
4 import java.lang.String;
2
712ffca654f3 Moved java classes to their correct location
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
5
21
9b96950f2c3c the 'java' tree compiles on both D1-Tango and D2-Phobos
Frank Benoit <benoit@tionex.de>
parents: 6
diff changeset
6 version(Tango){
9b96950f2c3c the 'java' tree compiles on both D1-Tango and D2-Phobos
Frank Benoit <benoit@tionex.de>
parents: 6
diff changeset
7 static import tango.core.Exception;
9b96950f2c3c the 'java' tree compiles on both D1-Tango and D2-Phobos
Frank Benoit <benoit@tionex.de>
parents: 6
diff changeset
8 public alias tango.core.Exception.IllegalArgumentException IllegalArgumentException;
9b96950f2c3c the 'java' tree compiles on both D1-Tango and D2-Phobos
Frank Benoit <benoit@tionex.de>
parents: 6
diff changeset
9 public alias tango.core.Exception.IOException IOException;
9b96950f2c3c the 'java' tree compiles on both D1-Tango and D2-Phobos
Frank Benoit <benoit@tionex.de>
parents: 6
diff changeset
10 public alias tango.core.Exception.PlatformException PlatformException;
9b96950f2c3c the 'java' tree compiles on both D1-Tango and D2-Phobos
Frank Benoit <benoit@tionex.de>
parents: 6
diff changeset
11 public alias tango.core.Exception.ArrayBoundsException ArrayIndexOutOfBoundsException;
9b96950f2c3c the 'java' tree compiles on both D1-Tango and D2-Phobos
Frank Benoit <benoit@tionex.de>
parents: 6
diff changeset
12 public alias tango.core.Exception.NoSuchElementException NoSuchElementException;
9b96950f2c3c the 'java' tree compiles on both D1-Tango and D2-Phobos
Frank Benoit <benoit@tionex.de>
parents: 6
diff changeset
13 public alias tango.core.Exception.UnicodeException UnicodeException;
9b96950f2c3c the 'java' tree compiles on both D1-Tango and D2-Phobos
Frank Benoit <benoit@tionex.de>
parents: 6
diff changeset
14 alias Exception Throwable;
9b96950f2c3c the 'java' tree compiles on both D1-Tango and D2-Phobos
Frank Benoit <benoit@tionex.de>
parents: 6
diff changeset
15 } else { // Phobos
9b96950f2c3c the 'java' tree compiles on both D1-Tango and D2-Phobos
Frank Benoit <benoit@tionex.de>
parents: 6
diff changeset
16
9b96950f2c3c the 'java' tree compiles on both D1-Tango and D2-Phobos
Frank Benoit <benoit@tionex.de>
parents: 6
diff changeset
17 static import core.exception;
9b96950f2c3c the 'java' tree compiles on both D1-Tango and D2-Phobos
Frank Benoit <benoit@tionex.de>
parents: 6
diff changeset
18 public alias core.exception.RangeError ArrayIndexOutOfBoundsException;
9b96950f2c3c the 'java' tree compiles on both D1-Tango and D2-Phobos
Frank Benoit <benoit@tionex.de>
parents: 6
diff changeset
19
26
f589fc20a5f9 work on linux phobos
Frank Benoit <benoit@tionex.de>
parents: 21
diff changeset
20 class PlatformException : Exception {
f589fc20a5f9 work on linux phobos
Frank Benoit <benoit@tionex.de>
parents: 21
diff changeset
21 this( String e = null ){
f589fc20a5f9 work on linux phobos
Frank Benoit <benoit@tionex.de>
parents: 21
diff changeset
22 super(e);
f589fc20a5f9 work on linux phobos
Frank Benoit <benoit@tionex.de>
parents: 21
diff changeset
23 }
f589fc20a5f9 work on linux phobos
Frank Benoit <benoit@tionex.de>
parents: 21
diff changeset
24 }
f589fc20a5f9 work on linux phobos
Frank Benoit <benoit@tionex.de>
parents: 21
diff changeset
25
21
9b96950f2c3c the 'java' tree compiles on both D1-Tango and D2-Phobos
Frank Benoit <benoit@tionex.de>
parents: 6
diff changeset
26 class IllegalArgumentException : Exception {
9b96950f2c3c the 'java' tree compiles on both D1-Tango and D2-Phobos
Frank Benoit <benoit@tionex.de>
parents: 6
diff changeset
27 this( String e = null ){
9b96950f2c3c the 'java' tree compiles on both D1-Tango and D2-Phobos
Frank Benoit <benoit@tionex.de>
parents: 6
diff changeset
28 super(e);
9b96950f2c3c the 'java' tree compiles on both D1-Tango and D2-Phobos
Frank Benoit <benoit@tionex.de>
parents: 6
diff changeset
29 }
9b96950f2c3c the 'java' tree compiles on both D1-Tango and D2-Phobos
Frank Benoit <benoit@tionex.de>
parents: 6
diff changeset
30 }
9b96950f2c3c the 'java' tree compiles on both D1-Tango and D2-Phobos
Frank Benoit <benoit@tionex.de>
parents: 6
diff changeset
31
9b96950f2c3c the 'java' tree compiles on both D1-Tango and D2-Phobos
Frank Benoit <benoit@tionex.de>
parents: 6
diff changeset
32 class IOException : Exception {
9b96950f2c3c the 'java' tree compiles on both D1-Tango and D2-Phobos
Frank Benoit <benoit@tionex.de>
parents: 6
diff changeset
33 this( String e = null ){
9b96950f2c3c the 'java' tree compiles on both D1-Tango and D2-Phobos
Frank Benoit <benoit@tionex.de>
parents: 6
diff changeset
34 super(e);
9b96950f2c3c the 'java' tree compiles on both D1-Tango and D2-Phobos
Frank Benoit <benoit@tionex.de>
parents: 6
diff changeset
35 }
9b96950f2c3c the 'java' tree compiles on both D1-Tango and D2-Phobos
Frank Benoit <benoit@tionex.de>
parents: 6
diff changeset
36 }
9b96950f2c3c the 'java' tree compiles on both D1-Tango and D2-Phobos
Frank Benoit <benoit@tionex.de>
parents: 6
diff changeset
37
9b96950f2c3c the 'java' tree compiles on both D1-Tango and D2-Phobos
Frank Benoit <benoit@tionex.de>
parents: 6
diff changeset
38 class NoSuchElementException : Exception {
9b96950f2c3c the 'java' tree compiles on both D1-Tango and D2-Phobos
Frank Benoit <benoit@tionex.de>
parents: 6
diff changeset
39 this( String e = null ){
9b96950f2c3c the 'java' tree compiles on both D1-Tango and D2-Phobos
Frank Benoit <benoit@tionex.de>
parents: 6
diff changeset
40 super(e);
9b96950f2c3c the 'java' tree compiles on both D1-Tango and D2-Phobos
Frank Benoit <benoit@tionex.de>
parents: 6
diff changeset
41 }
9b96950f2c3c the 'java' tree compiles on both D1-Tango and D2-Phobos
Frank Benoit <benoit@tionex.de>
parents: 6
diff changeset
42 }
9b96950f2c3c the 'java' tree compiles on both D1-Tango and D2-Phobos
Frank Benoit <benoit@tionex.de>
parents: 6
diff changeset
43
9b96950f2c3c the 'java' tree compiles on both D1-Tango and D2-Phobos
Frank Benoit <benoit@tionex.de>
parents: 6
diff changeset
44 class UnicodeException : Exception {
9b96950f2c3c the 'java' tree compiles on both D1-Tango and D2-Phobos
Frank Benoit <benoit@tionex.de>
parents: 6
diff changeset
45 this( String msg, int idx){
9b96950f2c3c the 'java' tree compiles on both D1-Tango and D2-Phobos
Frank Benoit <benoit@tionex.de>
parents: 6
diff changeset
46 super( "" );
9b96950f2c3c the 'java' tree compiles on both D1-Tango and D2-Phobos
Frank Benoit <benoit@tionex.de>
parents: 6
diff changeset
47 }
9b96950f2c3c the 'java' tree compiles on both D1-Tango and D2-Phobos
Frank Benoit <benoit@tionex.de>
parents: 6
diff changeset
48 }
9b96950f2c3c the 'java' tree compiles on both D1-Tango and D2-Phobos
Frank Benoit <benoit@tionex.de>
parents: 6
diff changeset
49
9b96950f2c3c the 'java' tree compiles on both D1-Tango and D2-Phobos
Frank Benoit <benoit@tionex.de>
parents: 6
diff changeset
50 }
9b96950f2c3c the 'java' tree compiles on both D1-Tango and D2-Phobos
Frank Benoit <benoit@tionex.de>
parents: 6
diff changeset
51
9b96950f2c3c the 'java' tree compiles on both D1-Tango and D2-Phobos
Frank Benoit <benoit@tionex.de>
parents: 6
diff changeset
52 class InternalError : Exception {
9b96950f2c3c the 'java' tree compiles on both D1-Tango and D2-Phobos
Frank Benoit <benoit@tionex.de>
parents: 6
diff changeset
53 this( String file, long line, String e = null ){
9b96950f2c3c the 'java' tree compiles on both D1-Tango and D2-Phobos
Frank Benoit <benoit@tionex.de>
parents: 6
diff changeset
54 super(e);
9b96950f2c3c the 'java' tree compiles on both D1-Tango and D2-Phobos
Frank Benoit <benoit@tionex.de>
parents: 6
diff changeset
55 }
9b96950f2c3c the 'java' tree compiles on both D1-Tango and D2-Phobos
Frank Benoit <benoit@tionex.de>
parents: 6
diff changeset
56 }
6
f36c67707cb3 Removed import to tango.core.Exception
Frank Benoit <benoit@tionex.de>
parents: 2
diff changeset
57
98
48d4ee626868 rm databinding.observable seems to be duplicate, databinding.beans now building
Frank Benoit <benoit@tionex.de>
parents: 84
diff changeset
58 class ArithmeticException : Exception {
48d4ee626868 rm databinding.observable seems to be duplicate, databinding.beans now building
Frank Benoit <benoit@tionex.de>
parents: 84
diff changeset
59 this( String e = null ){
48d4ee626868 rm databinding.observable seems to be duplicate, databinding.beans now building
Frank Benoit <benoit@tionex.de>
parents: 84
diff changeset
60 super(e);
48d4ee626868 rm databinding.observable seems to be duplicate, databinding.beans now building
Frank Benoit <benoit@tionex.de>
parents: 84
diff changeset
61 }
48d4ee626868 rm databinding.observable seems to be duplicate, databinding.beans now building
Frank Benoit <benoit@tionex.de>
parents: 84
diff changeset
62 }
48d4ee626868 rm databinding.observable seems to be duplicate, databinding.beans now building
Frank Benoit <benoit@tionex.de>
parents: 84
diff changeset
63
2
712ffca654f3 Moved java classes to their correct location
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
64 class ClassCastException : Exception {
712ffca654f3 Moved java classes to their correct location
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
65 this( String e = null ){
712ffca654f3 Moved java classes to their correct location
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
66 super(e);
712ffca654f3 Moved java classes to their correct location
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
67 }
712ffca654f3 Moved java classes to their correct location
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
68 }
712ffca654f3 Moved java classes to their correct location
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
69
712ffca654f3 Moved java classes to their correct location
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
70 class IllegalStateException : Exception {
712ffca654f3 Moved java classes to their correct location
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
71 this( String e = null ){
712ffca654f3 Moved java classes to their correct location
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
72 super(e);
712ffca654f3 Moved java classes to their correct location
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
73 }
712ffca654f3 Moved java classes to their correct location
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
74 this( Exception e ){
712ffca654f3 Moved java classes to their correct location
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
75 super(e.toString);
712ffca654f3 Moved java classes to their correct location
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
76 }
712ffca654f3 Moved java classes to their correct location
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
77 }
712ffca654f3 Moved java classes to their correct location
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
78
98
48d4ee626868 rm databinding.observable seems to be duplicate, databinding.beans now building
Frank Benoit <benoit@tionex.de>
parents: 84
diff changeset
79 class NoSuchMethodException : Exception {
48d4ee626868 rm databinding.observable seems to be duplicate, databinding.beans now building
Frank Benoit <benoit@tionex.de>
parents: 84
diff changeset
80 this( String e = null){
48d4ee626868 rm databinding.observable seems to be duplicate, databinding.beans now building
Frank Benoit <benoit@tionex.de>
parents: 84
diff changeset
81 super(e);
48d4ee626868 rm databinding.observable seems to be duplicate, databinding.beans now building
Frank Benoit <benoit@tionex.de>
parents: 84
diff changeset
82 }
48d4ee626868 rm databinding.observable seems to be duplicate, databinding.beans now building
Frank Benoit <benoit@tionex.de>
parents: 84
diff changeset
83 }
48d4ee626868 rm databinding.observable seems to be duplicate, databinding.beans now building
Frank Benoit <benoit@tionex.de>
parents: 84
diff changeset
84
48d4ee626868 rm databinding.observable seems to be duplicate, databinding.beans now building
Frank Benoit <benoit@tionex.de>
parents: 84
diff changeset
85 class IllegalAccessException : Exception {
48d4ee626868 rm databinding.observable seems to be duplicate, databinding.beans now building
Frank Benoit <benoit@tionex.de>
parents: 84
diff changeset
86 this( String e = null){
48d4ee626868 rm databinding.observable seems to be duplicate, databinding.beans now building
Frank Benoit <benoit@tionex.de>
parents: 84
diff changeset
87 super(e);
48d4ee626868 rm databinding.observable seems to be duplicate, databinding.beans now building
Frank Benoit <benoit@tionex.de>
parents: 84
diff changeset
88 }
48d4ee626868 rm databinding.observable seems to be duplicate, databinding.beans now building
Frank Benoit <benoit@tionex.de>
parents: 84
diff changeset
89 }
48d4ee626868 rm databinding.observable seems to be duplicate, databinding.beans now building
Frank Benoit <benoit@tionex.de>
parents: 84
diff changeset
90
48d4ee626868 rm databinding.observable seems to be duplicate, databinding.beans now building
Frank Benoit <benoit@tionex.de>
parents: 84
diff changeset
91 class SecurityException : Exception {
48d4ee626868 rm databinding.observable seems to be duplicate, databinding.beans now building
Frank Benoit <benoit@tionex.de>
parents: 84
diff changeset
92 this( String e = null){
48d4ee626868 rm databinding.observable seems to be duplicate, databinding.beans now building
Frank Benoit <benoit@tionex.de>
parents: 84
diff changeset
93 super(e);
48d4ee626868 rm databinding.observable seems to be duplicate, databinding.beans now building
Frank Benoit <benoit@tionex.de>
parents: 84
diff changeset
94 }
48d4ee626868 rm databinding.observable seems to be duplicate, databinding.beans now building
Frank Benoit <benoit@tionex.de>
parents: 84
diff changeset
95 }
48d4ee626868 rm databinding.observable seems to be duplicate, databinding.beans now building
Frank Benoit <benoit@tionex.de>
parents: 84
diff changeset
96
2
712ffca654f3 Moved java classes to their correct location
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
97 class IndexOutOfBoundsException : Exception {
712ffca654f3 Moved java classes to their correct location
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
98 this( String e = null){
712ffca654f3 Moved java classes to their correct location
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
99 super(e);
712ffca654f3 Moved java classes to their correct location
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
100 }
712ffca654f3 Moved java classes to their correct location
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
101 }
712ffca654f3 Moved java classes to their correct location
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
102
712ffca654f3 Moved java classes to their correct location
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
103 class InterruptedException : Exception {
712ffca654f3 Moved java classes to their correct location
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
104 this( String e = null ){
712ffca654f3 Moved java classes to their correct location
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
105 super(e);
712ffca654f3 Moved java classes to their correct location
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
106 }
712ffca654f3 Moved java classes to their correct location
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
107 this( Exception e ){
712ffca654f3 Moved java classes to their correct location
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
108 super(e.toString);
712ffca654f3 Moved java classes to their correct location
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
109 }
712ffca654f3 Moved java classes to their correct location
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
110 }
712ffca654f3 Moved java classes to their correct location
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
111
712ffca654f3 Moved java classes to their correct location
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
112 class NullPointerException : Exception {
712ffca654f3 Moved java classes to their correct location
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
113 this( String e = null ){
712ffca654f3 Moved java classes to their correct location
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
114 super(e);
712ffca654f3 Moved java classes to their correct location
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
115 }
712ffca654f3 Moved java classes to their correct location
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
116 this( Exception e ){
712ffca654f3 Moved java classes to their correct location
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
117 super(e.toString);
712ffca654f3 Moved java classes to their correct location
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
118 }
712ffca654f3 Moved java classes to their correct location
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
119 }
712ffca654f3 Moved java classes to their correct location
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
120
712ffca654f3 Moved java classes to their correct location
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
121 class NumberFormatException : IllegalArgumentException {
712ffca654f3 Moved java classes to their correct location
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
122 this( String e ){
712ffca654f3 Moved java classes to their correct location
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
123 super(e);
712ffca654f3 Moved java classes to their correct location
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
124 }
712ffca654f3 Moved java classes to their correct location
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
125 this( Exception e ){
712ffca654f3 Moved java classes to their correct location
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
126 super(e.toString);
712ffca654f3 Moved java classes to their correct location
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
127 }
84
fcf926c91ca4 Added base classes
Frank Benoit <benoit@tionex.de>
parents: 60
diff changeset
128 public String getMessage(){
fcf926c91ca4 Added base classes
Frank Benoit <benoit@tionex.de>
parents: 60
diff changeset
129 return msg;
fcf926c91ca4 Added base classes
Frank Benoit <benoit@tionex.de>
parents: 60
diff changeset
130 }
2
712ffca654f3 Moved java classes to their correct location
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
131 }
712ffca654f3 Moved java classes to their correct location
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
132
712ffca654f3 Moved java classes to their correct location
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
133 class RuntimeException : Exception {
21
9b96950f2c3c the 'java' tree compiles on both D1-Tango and D2-Phobos
Frank Benoit <benoit@tionex.de>
parents: 6
diff changeset
134 this( String file, long line, String msg = null){
2
712ffca654f3 Moved java classes to their correct location
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
135 super( msg, file, line );
712ffca654f3 Moved java classes to their correct location
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
136 }
712ffca654f3 Moved java classes to their correct location
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
137 this( String e = null){
712ffca654f3 Moved java classes to their correct location
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
138 super(e);
712ffca654f3 Moved java classes to their correct location
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
139 }
712ffca654f3 Moved java classes to their correct location
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
140 this( Exception e ){
712ffca654f3 Moved java classes to their correct location
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
141 super(e.toString);
712ffca654f3 Moved java classes to their correct location
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
142 next = e;
712ffca654f3 Moved java classes to their correct location
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
143 }
84
fcf926c91ca4 Added base classes
Frank Benoit <benoit@tionex.de>
parents: 60
diff changeset
144 public String getMessage(){
fcf926c91ca4 Added base classes
Frank Benoit <benoit@tionex.de>
parents: 60
diff changeset
145 return msg;
fcf926c91ca4 Added base classes
Frank Benoit <benoit@tionex.de>
parents: 60
diff changeset
146 }
21
9b96950f2c3c the 'java' tree compiles on both D1-Tango and D2-Phobos
Frank Benoit <benoit@tionex.de>
parents: 6
diff changeset
147 public Throwable getCause() {
9b96950f2c3c the 'java' tree compiles on both D1-Tango and D2-Phobos
Frank Benoit <benoit@tionex.de>
parents: 6
diff changeset
148 return next; // D2 has next of type Throwable
2
712ffca654f3 Moved java classes to their correct location
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
149 }
712ffca654f3 Moved java classes to their correct location
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
150 }
712ffca654f3 Moved java classes to their correct location
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
151
712ffca654f3 Moved java classes to their correct location
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
152 class UnsupportedOperationException : RuntimeException {
712ffca654f3 Moved java classes to their correct location
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
153 this( String e = null){
712ffca654f3 Moved java classes to their correct location
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
154 super(e);
712ffca654f3 Moved java classes to their correct location
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
155 }
712ffca654f3 Moved java classes to their correct location
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
156 this( Exception e ){
712ffca654f3 Moved java classes to their correct location
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
157 super(e.toString);
712ffca654f3 Moved java classes to their correct location
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
158 }
712ffca654f3 Moved java classes to their correct location
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
159 }
712ffca654f3 Moved java classes to their correct location
Frank Benoit <benoit@tionex.de>
parents:
diff changeset
160
21
9b96950f2c3c the 'java' tree compiles on both D1-Tango and D2-Phobos
Frank Benoit <benoit@tionex.de>
parents: 6
diff changeset
161 /// Extension to the D Exception
9b96950f2c3c the 'java' tree compiles on both D1-Tango and D2-Phobos
Frank Benoit <benoit@tionex.de>
parents: 6
diff changeset
162 String ExceptionGetLocalizedMessage( Exception e ){
9b96950f2c3c the 'java' tree compiles on both D1-Tango and D2-Phobos
Frank Benoit <benoit@tionex.de>
parents: 6
diff changeset
163 return e.msg;
9b96950f2c3c the 'java' tree compiles on both D1-Tango and D2-Phobos
Frank Benoit <benoit@tionex.de>
parents: 6
diff changeset
164 }
9b96950f2c3c the 'java' tree compiles on both D1-Tango and D2-Phobos
Frank Benoit <benoit@tionex.de>
parents: 6
diff changeset
165
9b96950f2c3c the 'java' tree compiles on both D1-Tango and D2-Phobos
Frank Benoit <benoit@tionex.de>
parents: 6
diff changeset
166 /// Extension to the D Exception
9b96950f2c3c the 'java' tree compiles on both D1-Tango and D2-Phobos
Frank Benoit <benoit@tionex.de>
parents: 6
diff changeset
167 void ExceptionPrintStackTrace( Exception e ){
9b96950f2c3c the 'java' tree compiles on both D1-Tango and D2-Phobos
Frank Benoit <benoit@tionex.de>
parents: 6
diff changeset
168 ExceptionPrintStackTrace( e, & getDwtLogger().error );
9b96950f2c3c the 'java' tree compiles on both D1-Tango and D2-Phobos
Frank Benoit <benoit@tionex.de>
parents: 6
diff changeset
169 }
9b96950f2c3c the 'java' tree compiles on both D1-Tango and D2-Phobos
Frank Benoit <benoit@tionex.de>
parents: 6
diff changeset
170
9b96950f2c3c the 'java' tree compiles on both D1-Tango and D2-Phobos
Frank Benoit <benoit@tionex.de>
parents: 6
diff changeset
171 /// Extension to the D Exception
9b96950f2c3c the 'java' tree compiles on both D1-Tango and D2-Phobos
Frank Benoit <benoit@tionex.de>
parents: 6
diff changeset
172 void ExceptionPrintStackTrace( Throwable e, void delegate ( String file, ulong line, String fmt, ... ) dg ){
9b96950f2c3c the 'java' tree compiles on both D1-Tango and D2-Phobos
Frank Benoit <benoit@tionex.de>
parents: 6
diff changeset
173 Throwable exception = e;
9b96950f2c3c the 'java' tree compiles on both D1-Tango and D2-Phobos
Frank Benoit <benoit@tionex.de>
parents: 6
diff changeset
174 while( exception !is null ){
9b96950f2c3c the 'java' tree compiles on both D1-Tango and D2-Phobos
Frank Benoit <benoit@tionex.de>
parents: 6
diff changeset
175 dg( exception.file, exception.line, "Exception in {}({}): {}", exception.file, exception.line, exception.msg );
9b96950f2c3c the 'java' tree compiles on both D1-Tango and D2-Phobos
Frank Benoit <benoit@tionex.de>
parents: 6
diff changeset
176 if( exception.info !is null ){
60
66be6a990713 new eclipsetools target, fix of new exception stacktrace info.
Frank Benoit <benoit@tionex.de>
parents: 27
diff changeset
177 foreach( frame; exception.info ){
66be6a990713 new eclipsetools target, fix of new exception stacktrace info.
Frank Benoit <benoit@tionex.de>
parents: 27
diff changeset
178 dg( exception.file, exception.line, "trc {} {}", frame.file, frame.line );
21
9b96950f2c3c the 'java' tree compiles on both D1-Tango and D2-Phobos
Frank Benoit <benoit@tionex.de>
parents: 6
diff changeset
179 }
9b96950f2c3c the 'java' tree compiles on both D1-Tango and D2-Phobos
Frank Benoit <benoit@tionex.de>
parents: 6
diff changeset
180 }
9b96950f2c3c the 'java' tree compiles on both D1-Tango and D2-Phobos
Frank Benoit <benoit@tionex.de>
parents: 6
diff changeset
181 exception = exception.next;
9b96950f2c3c the 'java' tree compiles on both D1-Tango and D2-Phobos
Frank Benoit <benoit@tionex.de>
parents: 6
diff changeset
182 }
9b96950f2c3c the 'java' tree compiles on both D1-Tango and D2-Phobos
Frank Benoit <benoit@tionex.de>
parents: 6
diff changeset
183 }
9b96950f2c3c the 'java' tree compiles on both D1-Tango and D2-Phobos
Frank Benoit <benoit@tionex.de>
parents: 6
diff changeset
184
9b96950f2c3c the 'java' tree compiles on both D1-Tango and D2-Phobos
Frank Benoit <benoit@tionex.de>
parents: 6
diff changeset
185 void PrintStackTrace( int deepth = 100, String prefix = "trc" ){
9b96950f2c3c the 'java' tree compiles on both D1-Tango and D2-Phobos
Frank Benoit <benoit@tionex.de>
parents: 6
diff changeset
186 auto e = new Exception( null );
9b96950f2c3c the 'java' tree compiles on both D1-Tango and D2-Phobos
Frank Benoit <benoit@tionex.de>
parents: 6
diff changeset
187 int idx = 0;
9b96950f2c3c the 'java' tree compiles on both D1-Tango and D2-Phobos
Frank Benoit <benoit@tionex.de>
parents: 6
diff changeset
188 const start = 3;
60
66be6a990713 new eclipsetools target, fix of new exception stacktrace info.
Frank Benoit <benoit@tionex.de>
parents: 27
diff changeset
189 foreach( frame; e.info ){
21
9b96950f2c3c the 'java' tree compiles on both D1-Tango and D2-Phobos
Frank Benoit <benoit@tionex.de>
parents: 6
diff changeset
190 if( idx >= start && idx < start+deepth ) {
60
66be6a990713 new eclipsetools target, fix of new exception stacktrace info.
Frank Benoit <benoit@tionex.de>
parents: 27
diff changeset
191 getDwtLogger().trace( __FILE__, __LINE__, "{} {}: {}", prefix, frame.file, frame.line );
21
9b96950f2c3c the 'java' tree compiles on both D1-Tango and D2-Phobos
Frank Benoit <benoit@tionex.de>
parents: 6
diff changeset
192 }
9b96950f2c3c the 'java' tree compiles on both D1-Tango and D2-Phobos
Frank Benoit <benoit@tionex.de>
parents: 6
diff changeset
193 idx++;
9b96950f2c3c the 'java' tree compiles on both D1-Tango and D2-Phobos
Frank Benoit <benoit@tionex.de>
parents: 6
diff changeset
194 }
9b96950f2c3c the 'java' tree compiles on both D1-Tango and D2-Phobos
Frank Benoit <benoit@tionex.de>
parents: 6
diff changeset
195 }