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

Unified Diff: frog/minfrog

Issue 10054031: Pass optional arguments to NullPointerException constructor. (Closed) Base URL: https://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 | « frog/lib/natives.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: frog/minfrog
diff --git a/frog/minfrog b/frog/minfrog
index b48f95ff7eb221c6fa44d9be4ebcd000f8d60f18..7fd431a98764aeb6cf14cf032bbca9499c928aab 100755
--- a/frog/minfrog
+++ b/frog/minfrog
@@ -540,20 +540,11 @@ function NullPointerException(functionName, arguments) {
this.arguments = arguments;
}
NullPointerException.prototype.toString = function() {
- var sb = new StringBufferImpl("");
- if (this.arguments != null) {
- var $$list = this.arguments;
- for (var $$i = $$list.iterator(); $$i.hasNext(); ) {
- var arg = $$i.next();
- if (!sb.isEmpty()) sb.add(", ");
- sb.add(arg);
- }
- }
if (this.functionName == null) {
return this.get$exceptionName();
}
else {
- return (("" + this.get$exceptionName() + " : method: '" + this.functionName + "'\n") + "Receiver: null\n" + ("Arguments: [" + sb + "]"));
+ return (("" + this.get$exceptionName() + " : method: '" + this.functionName + "'\n") + "Receiver: null\n" + ("Arguments: " + this.arguments));
}
}
NullPointerException.prototype.get$exceptionName = function() {
@@ -682,14 +673,14 @@ function _toDartException(e) {
case 'property_not_function':
case 'called_non_callable':
if (e.arguments[0] == null) {
- return attachStack(new NullPointerException());
+ return attachStack(new NullPointerException(null, []));
} else {
return attachStack(new ObjectNotClosureException());
}
break;
case 'non_object_property_call':
case 'non_object_property_load':
- return attachStack(new NullPointerException());
+ return attachStack(new NullPointerException(null, []));
break;
case 'undefined_method':
var mname = e.arguments[0];
« no previous file with comments | « frog/lib/natives.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698