|
Vince's CSV Parser
|
A diagnostic whose text remains valid for the lifetime of the error. More...
#include <csv_error.hpp>
Public Member Functions | |
| CSVError (CSVErrorCode value, csv::string_view message) | |
| Copy runtime text, including temporary strings and exception messages. | |
| CSVError (const CSVError &other) | |
| CSVError (CSVError &&other) noexcept | |
| CSVError & | operator= (const CSVError &other) |
| CSVError & | operator= (CSVError &&other) noexcept |
| void | set_context (csv::string_view message) |
| Replace the context with an owned copy; accepts views into this error. | |
| operator bool () const noexcept | |
| void | clear () noexcept |
| std::string | message () const |
Static Public Member Functions | |
| static CSVError | from_static (CSVErrorCode value, csv::string_view message) noexcept |
| Borrow text that must remain valid for the program's lifetime. | |
Public Attributes | |
| CSVErrorCode | code = CSVErrorCode::None |
| std::error_code | system |
| csv::string_view | context |
| Diagnostic text; use set_context() to replace it with an owned copy. | |
A diagnostic whose text remains valid for the lifetime of the error.
Static messages are borrowed; dynamic messages are owned. Copies preserve that lifetime, and moved-from errors are cleared. Success and EOF clear the error without allocating. Explicit errors cover library validation and I/O, not allocation failures or exceptions thrown by user callbacks. Partial progress is not rolled back.
Definition at line 94 of file csv_error.hpp.
|
inline |
Copy runtime text, including temporary strings and exception messages.
Definition at line 102 of file csv_error.hpp.
|
inline |
Definition at line 105 of file csv_error.hpp.
|
inlinenoexcept |
Definition at line 109 of file csv_error.hpp.
|
inlinenoexcept |
Definition at line 152 of file csv_error.hpp.
|
inlinestaticnoexcept |
Borrow text that must remain valid for the program's lifetime.
Definition at line 133 of file csv_error.hpp.
|
inline |
Definition at line 158 of file csv_error.hpp.
|
inlineexplicitnoexcept |
Definition at line 151 of file csv_error.hpp.
Definition at line 114 of file csv_error.hpp.
Definition at line 121 of file csv_error.hpp.
|
inline |
Replace the context with an owned copy; accepts views into this error.
Definition at line 141 of file csv_error.hpp.
| CSVErrorCode csv::CSVError::code = CSVErrorCode::None |
Definition at line 95 of file csv_error.hpp.
| csv::string_view csv::CSVError::context |
Diagnostic text; use set_context() to replace it with an owned copy.
Definition at line 98 of file csv_error.hpp.
| std::error_code csv::CSVError::system |
Definition at line 96 of file csv_error.hpp.