2003/11/18 10:48:10
[org.ibex.core.git] / src / org / xwt / js / JSExn.java
1 // Copyright 2003 Adam Megacz, see the COPYING file for licensing [GPL] 
2 package org.xwt.js; 
3
4 import org.xwt.util.*; 
5 import org.xwt.*; 
6 import java.io.*;
7 import java.util.*;
8
9 // FIXME: extend Exception, not RuntimeException
10 /** An exception which can be thrown and caught by JavaScript code */
11 public class JSExn extends RuntimeException { 
12     private Object js = null; 
13     public JSExn(Object js) { this.js = js; } 
14     public String toString() { return "JSExn: " + js; }
15     public String getMessage() { return toString(); }
16     public Object getObject() { return js; } 
17