OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef EXTENSIONS_RENDERER_API_INVOCATION_ERRORS_H_ | 5 #ifndef EXTENSIONS_RENDERER_API_INVOCATION_ERRORS_H_ |
6 #define EXTENSIONS_RENDERER_API_INVOCATION_ERRORS_H_ | 6 #define EXTENSIONS_RENDERER_API_INVOCATION_ERRORS_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 25 matching lines...) Expand all Loading... |
36 std::string TooManyArrayItems(int maximum, int found); | 36 std::string TooManyArrayItems(int maximum, int found); |
37 std::string TooFewStringChars(int minimum, int found); | 37 std::string TooFewStringChars(int minimum, int found); |
38 std::string TooManyStringChars(int maximum, int found); | 38 std::string TooManyStringChars(int maximum, int found); |
39 std::string NumberTooSmall(int minimum); | 39 std::string NumberTooSmall(int minimum); |
40 std::string NumberTooLarge(int maximum); | 40 std::string NumberTooLarge(int maximum); |
41 std::string InvalidType(const char* expected_type, const char* actual_type); | 41 std::string InvalidType(const char* expected_type, const char* actual_type); |
42 std::string NotAnInstance(const char* instance_type); | 42 std::string NotAnInstance(const char* instance_type); |
43 std::string InvalidChoice(); | 43 std::string InvalidChoice(); |
44 std::string UnserializableValue(); | 44 std::string UnserializableValue(); |
45 std::string ScriptThrewError(); | 45 std::string ScriptThrewError(); |
| 46 std::string TooManyArguments(); |
| 47 std::string MissingRequiredArgument(const char* argument_name); |
46 | 48 |
47 // Returns an message indicating an error was found while parsing a given index | 49 // Returns an message indicating an error was found while parsing a given index |
48 // in an array. | 50 // in an array. |
49 std::string IndexError(uint32_t index, const std::string& error); | 51 std::string IndexError(uint32_t index, const std::string& error); |
50 | 52 |
51 // Returns a message indicating that an error was found while parsing a given | 53 // Returns a message indicating that an error was found while parsing a given |
52 // property on an object. | 54 // property on an object. |
53 std::string PropertyError(const char* property_name, const std::string& error); | 55 std::string PropertyError(const char* property_name, const std::string& error); |
54 | 56 |
| 57 // Returns a message indicating that an error was found while parsing a given |
| 58 // parameter in an API signature. |
| 59 std::string ArgumentError(const std::string& parameter_name, |
| 60 const std::string& error); |
| 61 |
55 } // namespace api_errors | 62 } // namespace api_errors |
56 } // namespace extensions | 63 } // namespace extensions |
57 | 64 |
58 #endif // EXTENSIONS_RENDERER_API_INVOCATION_ERRORS_H_ | 65 #endif // EXTENSIONS_RENDERER_API_INVOCATION_ERRORS_H_ |
OLD | NEW |