| Flutter Impeller |

Classes | Namespaces | Macros | Typedefs | Functions
validation.h File Reference
`#include <functional>`
`#include <sstream>`

Go to the source code of this file.

## Classes
class | impeller::ValidationLog
struct | impeller::ScopedValidationDisable
struct | impeller::ScopedValidationFatal

## Namespaces
| impeller

## Macros
#define | VALIDATION_LOG ::impeller::ValidationLog{__FILE__, __LINE__}.GetStream()

## Typedefs
using | impeller::ValidationFailureCallback = std::function< bool(const char *message, const char *file, int line)>

## Functions
void | impeller::ImpellerValidationBreak (const char *message, const char *file, int line)
void | impeller::ImpellerValidationErrorsSetFatal (bool fatal)
bool | impeller::ImpellerValidationErrorsAreFatal ()
void | impeller::ImpellerValidationErrorsSetCallback (ValidationFailureCallback callback)
| Sets a callback that callers (usually tests) can set to intercept validation failures. More...

## Macro Definition Documentation

## ◆ VALIDATION_LOG

#define VALIDATION_LOG ::impeller::ValidationLog{__FILE__, __LINE__}.GetStream()

Get a stream to the log Impeller uses for all validation errors. The behavior of these logs is as follows:

- Validation error are completely ignored in the Flutter release runtime-mode.
- In non-release runtime-modes, validation logs are redirected to the Flutter `INFO` log. These logs typically show up when verbose logging is enabled.
- If `ImpellerValidationErrorsSetFatal` is set to `true`, validation logs are fatal. The runtime-mode restriction still applies. This usually happens in test environments.

Definition at line 91 of file validation.h.