Support opting out of the default [error] prefix

This commit is contained in:
Ken Matsui
2022-05-22 13:50:45 +09:00
parent 5924325652
commit c26aa013cd
2 changed files with 17 additions and 2 deletions

View File

@@ -1630,6 +1630,15 @@ Note: It colorize `[error]` in red. That means that it detects `[error]` prefix
at the front of the error message. If there is no `[error]` prefix,
`format_error` adds it to the error message.
## Opting out of the default `[error]` prefix
toml11 prints error messages with the `[error]` prefix by default.
Defining `TOML11_NO_ERROR_PREFIX` will let toml11 omit the prefix regardless of colorized or not in case you would use a custom prefix, such as `Error:`.
```cpp
#define TOML11_NO_ERROR_PREFIX
```
## Serializing TOML data
toml11 enables you to serialize data into toml format.