Revision: 7943
Author: [email protected]
Date: Mon Apr 19 09:48:30 2010
Log: Log AssertionErrors thrown by Generators to improve developer experience.
Fix typo in existing log message.
Patch by: bobv
Review by: scottb

Review at http://gwt-code-reviews.appspot.com/362801

http://code.google.com/p/google-web-toolkit/source/detail?r=7943

Modified:
 /trunk/dev/core/src/com/google/gwt/dev/javac/StandardGeneratorContext.java

=======================================
--- /trunk/dev/core/src/com/google/gwt/dev/javac/StandardGeneratorContext.java Tue Mar 30 09:15:42 2010 +++ /trunk/dev/core/src/com/google/gwt/dev/javac/StandardGeneratorContext.java Mon Apr 19 09:48:30 2010
@@ -435,9 +435,14 @@
       msg += "; in " + (after - before) + " ms";
       logger.log(TreeLogger.DEBUG, msg, null);
       return className;
+    } catch (AssertionError e) {
+      // Catch and log the assertion as a convenience to the developer
+      logger.log(TreeLogger.ERROR, "Generator '" + generatorClass.getName()
+          + "' failed an assertion while rebinding '" + typeName + "'", e);
+      throw new UnableToCompleteException();
     } catch (RuntimeException e) {
       logger.log(TreeLogger.ERROR, "Generator '" + generatorClass.getName()
- + "' threw threw an exception while rebinding '" + typeName + "'", e);
+          + "' threw an exception while rebinding '" + typeName + "'", e);
       throw new UnableToCompleteException();
     } finally {
       PerfLogger.end();

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to