| 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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 result.append(") is outside the range "); | 112 result.append(") is outside the range "); |
| 113 result.append(lowerType == ExclusiveBound ? '(' : '['); | 113 result.append(lowerType == ExclusiveBound ? '(' : '['); |
| 114 result.append(formatNumber(lowerBound)); | 114 result.append(formatNumber(lowerBound)); |
| 115 result.append(", "); | 115 result.append(", "); |
| 116 result.append(formatNumber(upperBound)); | 116 result.append(formatNumber(upperBound)); |
| 117 result.append(upperType == ExclusiveBound ? ')' : ']'); | 117 result.append(upperType == ExclusiveBound ? ')' : ']'); |
| 118 result.append('.'); | 118 result.append('.'); |
| 119 return result.toString(); | 119 return result.toString(); |
| 120 } | 120 } |
| 121 | 121 |
| 122 static String invalidArity(const char* expected, unsigned provided); |
| 123 |
| 122 // If > 0, the argument index that failed type check (1-indexed.) | 124 // If > 0, the argument index that failed type check (1-indexed.) |
| 123 // If == 0, a (non-argument) value (e.g., a setter) failed the same check. | 125 // If == 0, a (non-argument) value (e.g., a setter) failed the same check. |
| 124 static String notAnArrayTypeArgumentOrValue(int argumentIndex); | 126 static String notAnArrayTypeArgumentOrValue(int argumentIndex); |
| 125 static String notASequenceTypeProperty(const String& propertyName); | 127 static String notASequenceTypeProperty(const String& propertyName); |
| 126 static String notAFiniteNumber(double value, const char* name = "value provi
ded"); | 128 static String notAFiniteNumber(double value, const char* name = "value provi
ded"); |
| 127 static String notAFiniteNumber(const Decimal& value, const char* name = "val
ue provided"); | 129 static String notAFiniteNumber(const Decimal& value, const char* name = "val
ue provided"); |
| 128 | 130 |
| 129 static String notEnoughArguments(unsigned expected, unsigned providedleastNu
mMandatoryParams); | 131 static String notEnoughArguments(unsigned expected, unsigned providedleastNu
mMandatoryParams); |
| 130 | 132 |
| 131 static String readOnly(const char* detail = 0); | 133 static String readOnly(const char* detail = 0); |
| (...skipping 21 matching lines...) Expand all Loading... |
| 153 | 155 |
| 154 static String ordinalNumber(int number); | 156 static String ordinalNumber(int number); |
| 155 }; | 157 }; |
| 156 | 158 |
| 157 template <> String ExceptionMessages::formatNumber<float>(float number); | 159 template <> String ExceptionMessages::formatNumber<float>(float number); |
| 158 template <> String ExceptionMessages::formatNumber<double>(double number); | 160 template <> String ExceptionMessages::formatNumber<double>(double number); |
| 159 | 161 |
| 160 } // namespace WebCore | 162 } // namespace WebCore |
| 161 | 163 |
| 162 #endif // ExceptionMessages_h | 164 #endif // ExceptionMessages_h |
| OLD | NEW |