Open Lighting Architecture: ola::web::SchemaErrorLogger Class Reference

| Open Lighting Architecture 0.10.9

Loading...
Searching...
No Matches
Public Member Functions | List of all members
ola::web::SchemaErrorLogger Class Reference

## Detailed Description

The SchemaErrorLogger captures errors while parsing the schema.

The SchemaErrorLogger allows schema parsing errors to be logged. It prepends the error with the value of the JsonPointer so users have a decent idea of where the error occurred in the JSON document.

## Public Member Functions
| SchemaErrorLogger (JsonPointer *pointer)
| Create a new SchemaErrorLogger.
bool | HasError () const
| Check if there was an error logged.
std::string | ErrorString () const
| Return the first error.
std::ostream & | Error ()
| Log an error.
void | Reset ()
| Clear the saved errors.

## Constructor & Destructor Documentation

## ◆ SchemaErrorLogger()

ola::web::SchemaErrorLogger::SchemaErrorLogger | ( | JsonPointer * | pointer | ) |
| inlineexplicit

Create a new SchemaErrorLogger.

Parameters

  pointer | the JsonPointer to use when logging error messages

## Member Function Documentation

## ◆ ErrorString()

std::string ola::web::SchemaErrorLogger::ErrorString | ( |  | ) | const

Return the first error.

Returns
  The first error, or the empty string if no error was reported.

The documentation for this class was generated from the following files:

- common/web/SchemaErrorLogger.h
- common/web/SchemaErrorLogger.cpp