com.google.gwt.core.client
Class JavaScriptException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by com.google.gwt.core.client.JavaScriptException
All Implemented Interfaces:
java.io.Serializable

public final class JavaScriptException
extends java.lang.RuntimeException

Any JavaScript exceptions occurring within JSNI methods are wrapped as this class when caught in Java code. The wrapping does not occur until the exception passes out of JSNI into Java. Before that, the thrown object remains a native JavaScript exception object, and can be caught in JSNI as normal.

See Also:
Serialized Form

Constructor Summary
protected JavaScriptException(java.lang.String message)
          Useful for server-side instantiation.
  JavaScriptException(java.lang.String name, java.lang.String description)
           
 
Method Summary
 java.lang.String getDescription()
           
 java.lang.String getName()
           
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JavaScriptException

public JavaScriptException(java.lang.String name,
                           java.lang.String description)
Parameters:
name - the original JavaScript type name of the exception
description - the original JavaScript message of the exception

JavaScriptException

protected JavaScriptException(java.lang.String message)
Useful for server-side instantiation.

Parameters:
message - the detail message.
Method Detail

getDescription

public java.lang.String getDescription()
Returns:
the original JavaScript message of the exception

getName

public java.lang.String getName()
Returns:
the original JavaScript type name of the exception