reflex::Pattern::Error Struct Reference

updated Thu Jan 26 2017
 
Public Types | Public Member Functions | Public Attributes | List of all members
reflex::Pattern::Error Struct Reference

Throwable error structure reflex::Pattern::Error. More...

#include <pattern.h>

Collaboration diagram for reflex::Pattern::Error:
Collaboration graph
[legend]

Public Types

enum  Code { REGEX_SYNTAX, REGEX_RANGE, REGEX_LIST, CODE_OVERFLOW }
 Error codes raised during Pattern object construction. More...
 

Public Member Functions

 Error (const Pattern *pattern, enum Code code, const char *message, size_t loc)
 Construct error structure. More...
 
void display (std::ostream &os=std::cerr) const
 

Public Attributes

const Patternpattern
 the pattern object with this error More...
 
enum Code code
 the error code More...
 
const char * message
 a human-readable error message (not NULL) More...
 
size_t loc
 location of the error in regex string Pattern::rex_ or 0 More...
 

Detailed Description

Throwable error structure reflex::Pattern::Error.

Member Enumeration Documentation

Error codes raised during Pattern object construction.

Enumerator
REGEX_SYNTAX 

regex syntax error

REGEX_RANGE 

regex {n,m} range error

REGEX_LIST 

regex [a-b] list error

CODE_OVERFLOW 

compiled code is too large

Constructor & Destructor Documentation

reflex::Pattern::Error::Error ( const Pattern pattern,
enum Code  code,
const char *  message,
size_t  loc 
)
inline

Construct error structure.

Parameters
patternpoints to the pattern object with this error
codethe error code
messagea human-readable error message (not NULL)
loclocation of the error in regex string Pattern::rex_ or 0

Member Function Documentation

void reflex::Pattern::Error::display ( std::ostream &  os = std::cerr) const

Member Data Documentation

enum Code reflex::Pattern::Error::code

the error code

size_t reflex::Pattern::Error::loc

location of the error in regex string Pattern::rex_ or 0

const char* reflex::Pattern::Error::message

a human-readable error message (not NULL)

const Pattern& reflex::Pattern::Error::pattern

the pattern object with this error


The documentation for this struct was generated from the following file: