Lines Matching refs:Error
19 class Error; // Forward declaration.
21 using ErrorPtr = std::unique_ptr<Error>;
23 class LIBWEAVE_EXPORT Error final {
25 ~Error() = default;
42 // Creates an instance of Error class.
50 // If |error| is not nullptr, creates another instance of Error class,
52 // the error chain pointed to by |error|.
53 static AddToTypeProxy AddTo(ErrorPtr* error,
57 // Same as the Error::AddTo above, but allows to pass in a printf-like
58 // format string and optional parameters to format the error message.
59 static AddToTypeProxy AddToPrintf(ErrorPtr* error,
65 // Clones error with all inner errors.
68 // Returns the error code and message
72 // Returns the location of the error in the source code.
78 // specified error code.
81 // Gets a pointer to the inner error, if present. Returns nullptr otherwise.
82 const Error* GetInnerError() const { return inner_error_.get(); }
84 // Gets a pointer to the first error occurred.
85 // Returns itself if no inner error are available.
86 const Error* GetFirstError() const;
88 // Finds an error with the given code in the error chain stating at
89 // |error_chain_start|. Returns the pointer to the first matching error
92 static const Error* FindError(const Error* error_chain_start,
98 Error(const tracked_objects::Location& location,
103 Error(const tracked_objects::LocationSnapshot& location,
108 // Error code. A unique error code identifier.
110 // Human-readable error message.
112 // Error origin in the source code.
114 // Pointer to inner error, if any. This forms a chain of errors.
118 DISALLOW_COPY_AND_ASSIGN(Error);
124 // Successfully completed operation should run callback with |error| set to
125 // null. Failed operation should run callback with |error| containing error
127 using DoneCallback = base::Callback<void(ErrorPtr error)>;