Index: Source/bindings/v8/ExceptionMessages.h |
diff --git a/Source/bindings/v8/ExceptionMessages.h b/Source/bindings/v8/ExceptionMessages.h |
index 85475609e719c741a9c2f58cb17abdb2d7b722a7..f78a6f4a971b883b784c70a4915ec18fd061b6d2 100644 |
--- a/Source/bindings/v8/ExceptionMessages.h |
+++ b/Source/bindings/v8/ExceptionMessages.h |
@@ -46,9 +46,12 @@ public: |
ExclusiveBound, |
}; |
- static String failedToConstruct(const String& type, const String& detail = String()); |
- static String failedToEnumerate(const String& type, const String& detail = String()); |
- static String failedToExecute(const String& method, const String& type, const String& detail = String()); |
+ static String argumentNullOrIncorrectType(int argumentIndex, const String& expectedType); |
+ static String constructorNotCallableAsFunction(const String& type); |
+ |
+ static String failedToConstruct(const String& type, const String& detail); |
+ static String failedToEnumerate(const String& type, const String& detail); |
+ static String failedToExecute(const String& method, const String& type, const String& detail); |
static String failedToGet(const String& property, const String& type, const String& detail); |
static String failedToSet(const String& property, const String& type, const String& detail); |
static String failedToDelete(const String& property, const String& type, const String& detail); |
@@ -56,20 +59,13 @@ public: |
static String failedToSetIndexed(const String& type, const String& detail); |
static String failedToDeleteIndexed(const String& type, const String& detail); |
- static String incorrectPropertyType(const String& property, const String& detail); |
- |
- static String argumentNullOrIncorrectType(int argumentIndex, const String& expectedType); |
- |
- // If > 0, the argument index that failed type check (1-indexed.) |
- // If == 0, a (non-argument) value (e.g., a setter) failed the same check. |
- static String notAnArrayTypeArgumentOrValue(int argumentIndex); |
- static String notASequenceTypeProperty(const String& propertyName); |
- static String notAFiniteNumber(double value, const char* name = "value provided"); |
- static String notAFiniteNumber(const Decimal& value, const char* name = "value provided"); |
- |
- static String notEnoughArguments(unsigned expected, unsigned providedleastNumMandatoryParams); |
+ template <typename NumType> |
+ static String formatNumber(NumType number) |
+ { |
+ return formatFiniteNumber(number); |
+ } |
- static String readOnly(const char* detail = 0); |
+ static String incorrectPropertyType(const String& property, const String& detail); |
template <typename NumberType> |
static String indexExceedsMaximumBound(const char* name, NumberType given, NumberType bound) |
@@ -123,16 +119,18 @@ public: |
return result.toString(); |
} |
- template <typename NumType> |
- static String formatNumber(NumType number) |
- { |
- return formatFiniteNumber(number); |
- } |
+ // If > 0, the argument index that failed type check (1-indexed.) |
+ // If == 0, a (non-argument) value (e.g., a setter) failed the same check. |
+ static String notAnArrayTypeArgumentOrValue(int argumentIndex); |
+ static String notASequenceTypeProperty(const String& propertyName); |
+ static String notAFiniteNumber(double value, const char* name = "value provided"); |
+ static String notAFiniteNumber(const Decimal& value, const char* name = "value provided"); |
-private: |
- static String ordinalNumber(int number); |
+ static String notEnoughArguments(unsigned expected, unsigned providedleastNumMandatoryParams); |
+ static String readOnly(const char* detail = 0); |
+private: |
template <typename NumType> |
static String formatFiniteNumber(NumType number) |
{ |
@@ -152,6 +150,8 @@ private: |
return String::format("%e", number); |
return String::number(number); |
} |
+ |
+ static String ordinalNumber(int number); |
}; |
template <> String ExceptionMessages::formatNumber<float>(float number); |