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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 result.Append(FormatNumber(lower_bound)); | 133 result.Append(FormatNumber(lower_bound)); |
134 result.Append(", "); | 134 result.Append(", "); |
135 result.Append(FormatNumber(upper_bound)); | 135 result.Append(FormatNumber(upper_bound)); |
136 result.Append(upper_type == kExclusiveBound ? ')' : ']'); | 136 result.Append(upper_type == kExclusiveBound ? ')' : ']'); |
137 result.Append('.'); | 137 result.Append('.'); |
138 return result.ToString(); | 138 return result.ToString(); |
139 } | 139 } |
140 | 140 |
141 static String InvalidArity(const char* expected, unsigned provided); | 141 static String InvalidArity(const char* expected, unsigned provided); |
142 | 142 |
143 // If > 0, the argument index that failed type check (1-indexed.) | |
144 // If == 0, a (non-argument) value (e.g., a setter) failed the same check. | |
145 static String NotAnArrayTypeArgumentOrValue(int argument_index); | |
146 static String NotASequenceTypeProperty(const String& property_name); | 143 static String NotASequenceTypeProperty(const String& property_name); |
147 static String NotAFiniteNumber(double value, | 144 static String NotAFiniteNumber(double value, |
148 const char* name = "value provided"); | 145 const char* name = "value provided"); |
149 static String NotAFiniteNumber(const Decimal& value, | 146 static String NotAFiniteNumber(const Decimal& value, |
150 const char* name = "value provided"); | 147 const char* name = "value provided"); |
151 | 148 |
152 static String NotEnoughArguments(unsigned expected, unsigned provided); | 149 static String NotEnoughArguments(unsigned expected, unsigned provided); |
153 | 150 |
154 static String ReadOnly(const char* detail = 0); | 151 static String ReadOnly(const char* detail = 0); |
155 | 152 |
(...skipping 20 matching lines...) Expand all Loading... |
176 }; | 173 }; |
177 | 174 |
178 template <> | 175 template <> |
179 String ExceptionMessages::FormatNumber<float>(float number); | 176 String ExceptionMessages::FormatNumber<float>(float number); |
180 template <> | 177 template <> |
181 String ExceptionMessages::FormatNumber<double>(double number); | 178 String ExceptionMessages::FormatNumber<double>(double number); |
182 | 179 |
183 } // namespace blink | 180 } // namespace blink |
184 | 181 |
185 #endif // ExceptionMessages_h | 182 #endif // ExceptionMessages_h |
OLD | NEW |