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

Unified Diff: pkg/scheduled_test/lib/src/schedule_error.dart

Issue 12473003: Remove deprecated StringBuffer.add, addAll and addCharCode. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 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: pkg/scheduled_test/lib/src/schedule_error.dart
diff --git a/pkg/scheduled_test/lib/src/schedule_error.dart b/pkg/scheduled_test/lib/src/schedule_error.dart
index d36be02db6c081cba4edc75afdd95fb3a9febb8a..179419b5ae6c4362b7b64308cb3b664e93c1eade 100644
--- a/pkg/scheduled_test/lib/src/schedule_error.dart
+++ b/pkg/scheduled_test/lib/src/schedule_error.dart
@@ -64,28 +64,28 @@ class ScheduleError extends AsyncError {
var errorString = error.toString();
if (errorString.contains("\n")) {
- result.add('ScheduleError:\n');
- result.add(prefixLines(errorString.trim()));
- result.add("\n\n");
+ result.write('ScheduleError:\n');
+ result.write(prefixLines(errorString.trim()));
+ result.write("\n\n");
} else {
- result.add('ScheduleError: "$errorString"\n');
+ result.write('ScheduleError: "$errorString"\n');
}
- result.add('Stack trace:\n');
- result.add(prefixLines(stackTrace.toString().trim()));
- result.add("\n\n");
+ result.write('Stack trace:\n');
+ result.write(prefixLines(stackTrace.toString().trim()));
+ result.write("\n\n");
if (task != null) {
- result.add('Error detected during task in queue "$queue":\n');
- result.add(task.generateTree());
+ result.write('Error detected during task in queue "$queue":\n');
+ result.write(task.generateTree());
} else if (_stateWhenDetected == ScheduleState.DONE) {
- result.add('Error detected after all tasks in the schedule had '
+ result.write('Error detected after all tasks in the schedule had '
'finished.');
} else if (_stateWhenDetected == ScheduleState.RUNNING) {
- result.add('Error detected when waiting for out-of-band callbacks in '
+ result.write('Error detected when waiting for out-of-band callbacks in '
'queue "$queue".');
} else { // _stateWhenDetected == ScheduleState.SET_UP
- result.add('Error detected before the schedule started running.');
+ result.write('Error detected before the schedule started running.');
}
return result.toString();

Powered by Google App Engine
This is Rietveld 408576698