Fluent builder for constructing Report instances.
More...
#include <report.hpp>
Fluent builder for constructing Report instances.
◆ build()
| Report pretty_diagnostics::Report::Builder::build |
( |
| ) |
const |
Builds a complete Report
- Returns
- The constructed report
- Exceptions
-
| std::exception | If required fields are missing |
◆ code()
| Builder & pretty_diagnostics::Report::Builder::code |
( |
std::string |
code | ) |
|
Sets an optional error code or identifier.
- Parameters
-
| code | Error code or identifier |
- Returns
- Reference to this builder
◆ help()
| Builder & pretty_diagnostics::Report::Builder::help |
( |
std::string |
help | ) |
|
Sets optional help text.
- Parameters
-
- Returns
- Reference to this builder
◆ label()
| Builder & pretty_diagnostics::Report::Builder::label |
( |
std::string |
text, |
|
|
Span |
span |
|
) |
| |
Adds a label to the report.
- Parameters
-
- Returns
- Reference to this builder
◆ message()
| Builder & pretty_diagnostics::Report::Builder::message |
( |
std::string |
message | ) |
|
Sets the main diagnostic message.
- Parameters
-
| message | Diagnostic message text |
- Returns
- Reference to this builder
◆ note()
| Builder & pretty_diagnostics::Report::Builder::note |
( |
std::string |
note | ) |
|
Sets an optional note.
- Parameters
-
- Returns
- Reference to this builder
◆ severity()
| Builder & pretty_diagnostics::Report::Builder::severity |
( |
Severity |
severity | ) |
|
Sets report severity.
- Parameters
-
- Returns
- Reference to this builder
The documentation for this class was generated from the following file: