From 0a8f1e1925f5c8520f726c1dd30b2c33a450ae4d Mon Sep 17 00:00:00 2001 From: Manolo Carrasco Date: Fri, 10 Jul 2015 22:20:33 +0200 Subject: [PATCH] Throw an exception when wrapped object is unknown. --- .../src/main/java/com/google/gwt/query/client/GQuery.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/GQuery.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/GQuery.java index 4ed7cad8..736f024a 100644 --- a/gwtquery-core/src/main/java/com/google/gwt/query/client/GQuery.java +++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/GQuery.java @@ -270,8 +270,7 @@ public class GQuery implements Lazy { // Otherwise we wrap it as an element return new GQuery(jso. cast()); } - console - .log("Error: GQuery.$(Object o) could not wrap the type : ", o.getClass().getName(), o); + throw new RuntimeException("Error: GQuery.$(Object o) could not wrap the type : " + o.getClass().getName() + " " + o); } return $(); } -- 2.39.5