Chromium Code Reviews| 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 28 matching lines...) Expand all Loading... | |
| 39 | 39 |
| 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); |
|
Nils Barth (inactive)
2014/03/26 05:20:08
Can you eliminate failedToConstruct?
AFAICT I thin
sof
2014/03/26 06:18:58
I don't think that's possible -- it's used in a nu
Nils Barth (inactive)
2014/03/26 06:31:27
Got it, you're right!
(Quick code search turned up
| |
| 50 static String failedToEnumerate(const String& type, const String& detail = S tring()); | 50 static String failedToEnumerate(const String& type, const String& detail); |
| 51 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); |
| 52 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); |
| 53 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); |
| 54 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); | 55 static String failedToGetIndexed(const String& type, const String& detail); |
| 56 static String failedToSetIndexed(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 ); | 57 static String failedToDeleteIndexed(const String& type, const String& detail ); |
| 58 | 58 |
| 59 static String constructorNotCallableAsFunction(const String& type); | |
|
Nils Barth (inactive)
2014/03/26 05:20:08
Should we alphabetize these?
sof
2014/03/26 07:37:39
Done.
| |
| 60 | |
| 59 static String incorrectPropertyType(const String& property, const String& de tail); | 61 static String incorrectPropertyType(const String& property, const String& de tail); |
| 60 | 62 |
| 61 static String argumentNullOrIncorrectType(int argumentIndex, const String& e xpectedType); | 63 static String argumentNullOrIncorrectType(int argumentIndex, const String& e xpectedType); |
| 62 | 64 |
| 63 // If > 0, the argument index that failed type check (1-indexed.) | 65 // If > 0, the argument index that failed type check (1-indexed.) |
| 64 // If == 0, a (non-argument) value (e.g., a setter) failed the same check. | 66 // If == 0, a (non-argument) value (e.g., a setter) failed the same check. |
| 65 static String notAnArrayTypeArgumentOrValue(int argumentIndex); | 67 static String notAnArrayTypeArgumentOrValue(int argumentIndex); |
| 66 static String notASequenceTypeProperty(const String& propertyName); | 68 static String notASequenceTypeProperty(const String& propertyName); |
| 67 static String notAFiniteNumber(double value, const char* name = "value provi ded"); | 69 static String notAFiniteNumber(double value, const char* name = "value provi ded"); |
| 68 static String notAFiniteNumber(const Decimal& value, const char* name = "val ue provided"); | 70 static String notAFiniteNumber(const Decimal& value, const char* name = "val ue provided"); |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 153 return String::number(number); | 155 return String::number(number); |
| 154 } | 156 } |
| 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 |