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

Unified Diff: pkg/analyzer/lib/src/generated/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
« no previous file with comments | « editor/util/plugins/com.google.dart.java2dart/resources/java_engine.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/generated/java_engine.dart
diff --git a/pkg/analyzer/lib/src/generated/java_engine.dart b/pkg/analyzer/lib/src/generated/java_engine.dart
index 3c2d08ff0405bdb193f08d8f1902ba2cba3d8b72..e4e6b7c1b3d1755e23f3992b23b223f8375648d4 100644
--- a/pkg/analyzer/lib/src/generated/java_engine.dart
+++ b/pkg/analyzer/lib/src/generated/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);
jwren 2014/06/03 03:20:04 Is a \n inserted with writeOn? Same question for
Paul Berry 2014/06/10 17:15:46 Yes. _writeOn always ends with a call to buffer.w
+ }
+ 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 | « editor/util/plugins/com.google.dart.java2dart/resources/java_engine.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698