class MakeErrorStream
Defined at line 34 of file ../../third_party/cobalt/src/public/lib/statusor/status_macros.h
Stream object used to collect error messages in MAKE_ERROR macros
or append error messages with APPEND_ERROR. It accepts any
arguments with operator
<
<
to build an error string, and then has an
implicit cast operator to Status, which converts the
logged string to a Status object and returns it, after logging the
error. At least one call to operator
<
<
is required; a compile time
error will be generated if none are given. Errors will only be
logged by default for certain status codes, as defined in
IsLoggedByDefault. This class will give ERROR errors if you don't
retrieve a Status exactly once before destruction.
The class converts into an intermediate wrapper object
MakeErrorStreamWithOutput to check that the error stream gets at least one
item of input.
Public Methods
template <typename ERROR_CODE_TYPE>
void MakeErrorStream (const char * file, int line, ERROR_CODE_TYPE code)
Make an error with the given code.
Defined at line 73 of file ../../third_party/cobalt/src/public/lib/statusor/status_macros.h
template <typename T>
MakeErrorStreamWithOutput & operator<< (const T & value)
Defined at line 77 of file ../../third_party/cobalt/src/public/lib/statusor/status_macros.h
MakeErrorStream & with_log_stack_trace ()
When this message is logged (see with_logging()), include the stack trace.
Defined at line 84 of file ../../third_party/cobalt/src/public/lib/statusor/status_macros.h
MakeErrorStreamWithOutput & add_ret_check_failure (const char * condition)
Adds RET_CHECK failure text to error message.
Defined at line 90 of file ../../third_party/cobalt/src/public/lib/statusor/status_macros.h
Enumerations
enum PriorMessageHandling
| Name | Value |
|---|---|
| kAppendToPriorMessage | 0 |
| kPrependToPriorMessage | 1 |
When starting from an existing error status, this determines whether we'll
append or prepend to that status's error message.
Defined at line 69 of file ../../third_party/cobalt/src/public/lib/statusor/status_macros.h