OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 String ExceptionMessages::constructorNotCallableAsFunction(const char* type) | 84 String ExceptionMessages::constructorNotCallableAsFunction(const char* type) |
85 { | 85 { |
86 return failedToConstruct(type, "Please use the 'new' operator, this DOM obje
ct constructor cannot be called as a function."); | 86 return failedToConstruct(type, "Please use the 'new' operator, this DOM obje
ct constructor cannot be called as a function."); |
87 } | 87 } |
88 | 88 |
89 String ExceptionMessages::incorrectPropertyType(const String& property, const St
ring& detail) | 89 String ExceptionMessages::incorrectPropertyType(const String& property, const St
ring& detail) |
90 { | 90 { |
91 return "The '" + property + "' property " + detail; | 91 return "The '" + property + "' property " + detail; |
92 } | 92 } |
93 | 93 |
| 94 String ExceptionMessages::invalidArity(const char* expected, unsigned provided) |
| 95 { |
| 96 return "Valid arities are: " + String(expected) + ", but " + String::number(
provided) + " arguments provided."; |
| 97 } |
| 98 |
94 String ExceptionMessages::argumentNullOrIncorrectType(int argumentIndex, const S
tring& expectedType) | 99 String ExceptionMessages::argumentNullOrIncorrectType(int argumentIndex, const S
tring& expectedType) |
95 { | 100 { |
96 return "The " + ordinalNumber(argumentIndex) + " argument provided is either
null, or an invalid " + expectedType + " object."; | 101 return "The " + ordinalNumber(argumentIndex) + " argument provided is either
null, or an invalid " + expectedType + " object."; |
97 } | 102 } |
98 | 103 |
99 String ExceptionMessages::notAnArrayTypeArgumentOrValue(int argumentIndex) | 104 String ExceptionMessages::notAnArrayTypeArgumentOrValue(int argumentIndex) |
100 { | 105 { |
101 String kind; | 106 String kind; |
102 if (argumentIndex) // method argument | 107 if (argumentIndex) // method argument |
103 kind = ordinalNumber(argumentIndex) + " argument"; | 108 kind = ordinalNumber(argumentIndex) + " argument"; |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 return formatPotentiallyNonFiniteNumber(number); | 165 return formatPotentiallyNonFiniteNumber(number); |
161 } | 166 } |
162 | 167 |
163 template <> | 168 template <> |
164 String ExceptionMessages::formatNumber<double>(double number) | 169 String ExceptionMessages::formatNumber<double>(double number) |
165 { | 170 { |
166 return formatPotentiallyNonFiniteNumber(number); | 171 return formatPotentiallyNonFiniteNumber(number); |
167 } | 172 } |
168 | 173 |
169 } // namespace WebCore | 174 } // namespace WebCore |
OLD | NEW |