| 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 29 matching lines...) Expand all Loading... |
| 40 class Decimal; | 40 class Decimal; |
| 41 | 41 |
| 42 class ExceptionMessages { | 42 class ExceptionMessages { |
| 43 public: | 43 public: |
| 44 enum BoundType { | 44 enum BoundType { |
| 45 InclusiveBound, | 45 InclusiveBound, |
| 46 ExclusiveBound, | 46 ExclusiveBound, |
| 47 }; | 47 }; |
| 48 | 48 |
| 49 static String failedToConstruct(const String& type, const String& detail = S
tring()); | 49 static String failedToConstruct(const String& type, const String& detail = S
tring()); |
| 50 static String failedToEnumerate(const String& type, const String& detail = S
tring()); |
| 50 static String failedToExecute(const String& method, const String& type, cons
t String& detail = String()); | 51 static String failedToExecute(const String& method, const String& type, cons
t String& detail = String()); |
| 51 static String failedToGet(const String& property, const String& type, const
String& detail); | 52 static String failedToGet(const String& property, const String& type, const
String& detail); |
| 52 static String failedToSet(const String& property, const String& type, const
String& detail); | 53 static String failedToSet(const String& property, const String& type, const
String& detail); |
| 53 static String failedToDelete(const String& property, const String& type, con
st String& detail); | 54 static String failedToDelete(const String& property, const String& type, con
st String& detail); |
| 55 static String failedToGetIndexed(const String& type, const String& detail); |
| 56 static String failedToSetIndexed(const String& type, const String& detail); |
| 57 static String failedToDeleteIndexed(const String& type, const String& detail
); |
| 54 | 58 |
| 55 static String incorrectPropertyType(const String& property, const String& de
tail); | 59 static String incorrectPropertyType(const String& property, const String& de
tail); |
| 56 | 60 |
| 57 static String argumentNullOrIncorrectType(int argumentIndex, const String& e
xpectedType); | 61 static String argumentNullOrIncorrectType(int argumentIndex, const String& e
xpectedType); |
| 58 | 62 |
| 59 // If > 0, the argument index that failed type check (1-indexed.) | 63 // If > 0, the argument index that failed type check (1-indexed.) |
| 60 // If == 0, a (non-argument) value (e.g., a setter) failed the same check. | 64 // If == 0, a (non-argument) value (e.g., a setter) failed the same check. |
| 61 static String notAnArrayTypeArgumentOrValue(int argumentIndex); | 65 static String notAnArrayTypeArgumentOrValue(int argumentIndex); |
| 62 static String notASequenceTypeProperty(const String& propertyName); | 66 static String notASequenceTypeProperty(const String& propertyName); |
| 63 static String notAFiniteNumber(double value, const char* name = "value provi
ded"); | 67 static String notAFiniteNumber(double value, const char* name = "value provi
ded"); |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 return String::number(number); | 153 return String::number(number); |
| 150 } | 154 } |
| 151 }; | 155 }; |
| 152 | 156 |
| 153 template <> String ExceptionMessages::formatNumber<float>(float number); | 157 template <> String ExceptionMessages::formatNumber<float>(float number); |
| 154 template <> String ExceptionMessages::formatNumber<double>(double number); | 158 template <> String ExceptionMessages::formatNumber<double>(double number); |
| 155 | 159 |
| 156 } // namespace WebCore | 160 } // namespace WebCore |
| 157 | 161 |
| 158 #endif // ExceptionMessages_h | 162 #endif // ExceptionMessages_h |
| OLD | NEW |