libvariant
 All Classes Namespaces Files Functions Enumerations Groups
Public Member Functions | List of all members
libvariant::ValidationError Class Reference

This class encapsulates the information from a schema validation error. More...

#include <Variant/Schema.h>

Public Member Functions

 ValidationError (const std::string &m, const Path &dpath, const Path &spath)
 
void AddSubError (const SchemaResult &err)
 
const std::string & GetMessage () const
 The validation error message.
 
const Path & GetDataPath () const
 The path in the document where the error was encountered.
 
std::string GetDataPathStr () const
 String version of the data path.
 
const Path & GetSchemaPath () const
 The path in the schema where the error was encountered.
 
std::string GetSchemaPathStr () const
 String version of teh schema path.
 
const std::vector< SchemaResult > & GetSubErrors () const
 Get the list of sub errors, if any.
 
std::string PrettyPrintMessage () const
 Return a pretty printed string of this validation error.
 
void PrettyPrintMessage (std::ostream &os, unsigned indent=0) const
 Print a pretty printed version of this validation error to the std::ostream.
 

Detailed Description

This class encapsulates the information from a schema validation error.


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