Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(77)

Side by Side Diff: extensions/renderer/api_invocation_errors.h

Issue 2847853002: [Extensions Bindings] Add errors to signature parsing (Closed)
Patch Set: Rebase Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | extensions/renderer/api_invocation_errors.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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_
OLDNEW
« no previous file with comments | « no previous file | extensions/renderer/api_invocation_errors.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698