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

Unified Diff: corelib/src/exceptions.dart

Issue 10053022: Frog has hardwired access to NullPointerException: default argument can only be null. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 8 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: corelib/src/exceptions.dart
===================================================================
--- corelib/src/exceptions.dart (revision 6435)
+++ corelib/src/exceptions.dart (working copy)
@@ -121,13 +121,14 @@
class NullPointerException implements Exception {
- const NullPointerException([this.functionName,
- this.arguments = const[]]);
+ const NullPointerException([this.functionName, this.arguments]);
String toString() {
StringBuffer sb = new StringBuffer();
- for (var arg in arguments) {
- if (!sb.isEmpty()) sb.add(", ");
- sb.add(arg);
+ if (arguments != null) {
+ for (var arg in arguments) {
+ if (!sb.isEmpty()) sb.add(", ");
+ sb.add(arg);
+ }
}
if (functionName == null) {
return exceptionName;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698