1 16 package com.google.gwt.lang; 17 18 import com.google.gwt.core.client.JavaScriptException; 19 20 23 final class Exceptions { 24 25 static Object caught(Object e) { 26 if (e instanceof Throwable ) { 27 return e; 28 } 29 return new JavaScriptException(javaScriptExceptionName(e), 30 javaScriptExceptionDescription(e)); 31 } 32 33 37 private static native String javaScriptExceptionDescription(Object e) ; 40 41 45 private static native String javaScriptExceptionName(Object e) ; 48 49 } 50 | Popular Tags |