Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(41)

Unified Diff: editor/util/plugins/com.google.dart.java2dart/resources/java_engine.dart

Issue 304293010: Fixes to CaughtException and AnalysisException (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix toString Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: editor/util/plugins/com.google.dart.java2dart/resources/java_engine.dart
diff --git a/editor/util/plugins/com.google.dart.java2dart/resources/java_engine.dart b/editor/util/plugins/com.google.dart.java2dart/resources/java_engine.dart
index 3c2d08ff0405bdb193f08d8f1902ba2cba3d8b72..e4e6b7c1b3d1755e23f3992b23b223f8375648d4 100644
--- a/editor/util/plugins/com.google.dart.java2dart/resources/java_engine.dart
+++ b/editor/util/plugins/com.google.dart.java2dart/resources/java_engine.dart
@@ -255,6 +255,17 @@ class AnalysisException implements Exception {
* [cause].
*/
AnalysisException([this.message = 'Exception', this.cause = null]);
+
+ String toString() {
+ StringBuffer buffer = new StringBuffer();
+ buffer.write("AnalysisException: ");
+ buffer.writeln(message);
+ if (cause != null) {
+ buffer.write('Caused by ');
+ cause._writeOn(buffer);
+ }
+ return buffer.toString();
+ }
}
@@ -266,7 +277,7 @@ class CaughtException implements Exception {
/**
* The exception that was caught.
*/
- final Exception exception;
+ final Object exception;
/**
* The stack trace associated with the exception.
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/generated/java_engine.dart » ('j') | pkg/analyzer/lib/src/generated/java_engine.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698