Index: src/messages.js |
diff --git a/src/messages.js b/src/messages.js |
index e641133dda585fe2071c176664ba7bc77202200c..c46dcfdb4972dbf54ede4cbce96a703326b6a017 100644 |
--- a/src/messages.js |
+++ b/src/messages.js |
@@ -210,7 +210,7 @@ function FormatMessage(message) { |
"no_input_to_regexp", ["No input to ", "%0"], |
"invalid_json", ["String '", "%0", "' is not valid JSON"], |
"circular_structure", ["Converting circular structure to JSON"], |
- "obj_ctor_property_non_object", ["Object.", "%0", " called on non-object"], |
+ "called_on_non_object", ["%0", " called on non-object"], |
"called_on_null_or_undefined", ["%0", " called on null or undefined"], |
"array_indexof_not_defined", ["Array.getIndexOf: Argument undefined"], |
"object_not_extensible", ["Can't add property ", "%0", ", object is not extensible"], |
@@ -1190,9 +1190,8 @@ function ErrorToStringDetectCycle(error) { |
} |
function ErrorToString() { |
- if (IS_NULL_OR_UNDEFINED(this) && !IS_UNDETECTABLE(this)) { |
- throw MakeTypeError("called_on_null_or_undefined", |
- ["Error.prototype.toString"]); |
+ if (!IS_SPEC_OBJECT(this)) { |
+ throw MakeTypeError("called_on_non_object", ["Error.toString"]); |
rossberg
2012/03/05 10:04:58
Shouldn't that be Error.prototype.toString?
Michael Starzinger
2012/03/05 12:55:59
Done. You are right. I thought this is consistent
|
} |
try { |