glibmm  2.64.4
Public Types | Public Member Functions | List of all members
Glib::RegexError Class Reference

Exception class for Regex More...

#include <glibmm/regex.h>

Inheritance diagram for Glib::RegexError:
Inheritance graph
[legend]

Public Types

enum  Code {
  COMPILE = 0,
  OPTIMIZE = 1,
  REPLACE = 2,
  MATCH = 3,
  INTERNAL = 4,
  STRAY_BACKSLASH = 101,
  MISSING_CONTROL_CHAR = 102,
  UNRECOGNIZED_ESCAPE = 103,
  QUANTIFIERS_OUT_OF_ORDER = 104,
  QUANTIFIER_TOO_BIG = 105,
  UNTERMINATED_CHARACTER_CLASS = 106,
  INVALID_ESCAPE_IN_CHARACTER_CLASS = 107,
  RANGE_OUT_OF_ORDER = 108,
  NOTHING_TO_REPEAT = 109,
  UNRECOGNIZED_CHARACTER = 112,
  POSIX_NAMED_CLASS_OUTSIDE_CLASS = 113,
  UNMATCHED_PARENTHESIS = 114,
  INEXISTENT_SUBPATTERN_REFERENCE = 115,
  UNTERMINATED_COMMENT = 118,
  EXPRESSION_TOO_LARGE = 120,
  MEMORY_ERROR = 121,
  VARIABLE_LENGTH_LOOKBEHIND = 125,
  MALFORMED_CONDITION = 126,
  TOO_MANY_CONDITIONAL_BRANCHES = 127,
  ASSERTION_EXPECTED = 128,
  UNKNOWN_POSIX_CLASS_NAME = 130,
  POSIX_COLLATING_ELEMENTS_NOT_SUPPORTED = 131,
  HEX_CODE_TOO_LARGE = 134,
  INVALID_CONDITION = 135,
  SINGLE_BYTE_MATCH_IN_LOOKBEHIND = 136,
  INFINITE_LOOP = 140,
  MISSING_SUBPATTERN_NAME_TERMINATOR = 142,
  DUPLICATE_SUBPATTERN_NAME = 143,
  MALFORMED_PROPERTY = 146,
  UNKNOWN_PROPERTY = 147,
  SUBPATTERN_NAME_TOO_LONG = 148,
  TOO_MANY_SUBPATTERNS = 149,
  INVALID_OCTAL_VALUE = 151,
  TOO_MANY_BRANCHES_IN_DEFINE = 154,
  DEFINE_REPETION = 155,
  INCONSISTENT_NEWLINE_OPTIONS = 156,
  MISSING_BACK_REFERENCE = 157,
  INVALID_RELATIVE_REFERENCE = 158,
  BACKTRACKING_CONTROL_VERB_ARGUMENT_FORBIDDEN = 159,
  UNKNOWN_BACKTRACKING_CONTROL_VERB = 160,
  NUMBER_TOO_BIG = 161,
  MISSING_SUBPATTERN_NAME = 162,
  MISSING_DIGIT = 163,
  INVALID_DATA_CHARACTER = 164,
  EXTRA_SUBPATTERN_NAME = 165,
  BACKTRACKING_CONTROL_VERB_ARGUMENT_REQUIRED = 166,
  INVALID_CONTROL_CHAR = 168,
  MISSING_NAME = 169,
  NOT_SUPPORTED_IN_CLASS = 171,
  TOO_MANY_FORWARD_REFERENCES = 172,
  NAME_TOO_LONG = 175,
  CHARACTER_VALUE_TOO_LARGE = 176
}
 Error codes returned by regular expressions functions. More...
 

Public Member Functions

 RegexError (Code error_code, const Glib::ustring& error_message)
 
 RegexError (GError* gobject)
 
Code code () const
 
- Public Member Functions inherited from Glib::Error
 Error ()
 
 Error (GQuark error_domain, int error_code, const Glib::ustring& message)
 
 Error (GError* gobject, bool take_copy=false)
 
 Error (const Error& other)
 
Erroroperator= (const Error& other)
 
 ~Error () noexcept override
 
 operator bool () const
 Test whether the Error has an underlying instance. More...
 
GQuark domain () const
 
int code () const
 
Glib::ustring what () const override
 
bool matches (GQuark error_domain, int error_code) const
 
GError* gobj ()
 
const GError* gobj () const
 
- Public Member Functions inherited from Glib::Exception
virtual ~Exception () noexcept=0
 

Additional Inherited Members

- Protected Attributes inherited from Glib::Error
GError* gobject_
 

Detailed Description

Exception class for Regex

Member Enumeration Documentation

◆ Code

Error codes returned by regular expressions functions.

Since glibmm 2.14:
Enumerator
COMPILE 

Compilation of the regular expression failed.

OPTIMIZE 

Optimization of the regular expression failed.

REPLACE 

Replacement failed due to an ill-formed replacement string.

MATCH 

The match process failed.

INTERNAL 

Internal error of the regular expression engine.

Since glibmm 2.16:
STRAY_BACKSLASH 

"\\\\" at end of pattern.

Since glibmm 2.16:
MISSING_CONTROL_CHAR 

"\\\\c" at end of pattern.

Since glibmm 2.16:
UNRECOGNIZED_ESCAPE 

Unrecognized character follows "\\\\".

Since glibmm 2.16:
QUANTIFIERS_OUT_OF_ORDER 

Numbers out of order in "{}" quantifier.

Since glibmm 2.16:
QUANTIFIER_TOO_BIG 

Number too big in "{}" quantifier.

Since glibmm 2.16:
UNTERMINATED_CHARACTER_CLASS 

Missing terminating "]" for character class.

Since glibmm 2.16:
INVALID_ESCAPE_IN_CHARACTER_CLASS 

Invalid escape sequence in character class.

Since glibmm 2.16:
RANGE_OUT_OF_ORDER 

Range out of order in character class.

Since glibmm 2.16:
NOTHING_TO_REPEAT 

Nothing to repeat.

Since glibmm 2.16:
UNRECOGNIZED_CHARACTER 

Unrecognized character after "(?", "(?<" or "(?P".

Since glibmm 2.16:
POSIX_NAMED_CLASS_OUTSIDE_CLASS 

POSIX named classes are supported only within a class.

Since glibmm 2.16:
UNMATCHED_PARENTHESIS 

Missing terminating ")" or ")" without opening "(".

Since glibmm 2.16:
INEXISTENT_SUBPATTERN_REFERENCE 

Reference to non-existent subpattern.

Since glibmm 2.16:
UNTERMINATED_COMMENT 

Missing terminating ")" after comment.

Since glibmm 2.16:
EXPRESSION_TOO_LARGE 

Regular expression too large.

Since glibmm 2.16:
MEMORY_ERROR 

Failed to get memory.

Since glibmm 2.16:
VARIABLE_LENGTH_LOOKBEHIND 

Lookbehind assertion is not fixed length.

Since glibmm 2.16:
MALFORMED_CONDITION 

Malformed number or name after "(?(".

Since glibmm 2.16:
TOO_MANY_CONDITIONAL_BRANCHES 

Conditional group contains more than two branches.

Since glibmm 2.16:
ASSERTION_EXPECTED 

Assertion expected after "(?(".

Since glibmm 2.16:
UNKNOWN_POSIX_CLASS_NAME 

Unknown POSIX class name.

Since glibmm 2.16:
POSIX_COLLATING_ELEMENTS_NOT_SUPPORTED 

POSIX collating elements are not supported.

Since glibmm 2.16:
HEX_CODE_TOO_LARGE 

Character value in "\\\\x{...}" sequence is too large.

Since glibmm 2.16:
INVALID_CONDITION 

Invalid condition "(?(0)".

Since glibmm 2.16:
SINGLE_BYTE_MATCH_IN_LOOKBEHIND 

\\C not allowed in lookbehind assertion.

Since glibmm 2.16:
INFINITE_LOOP 

Recursive call could loop indefinitely.

Since glibmm 2.16:
MISSING_SUBPATTERN_NAME_TERMINATOR 

Missing terminator in subpattern name.

Since glibmm 2.16:
DUPLICATE_SUBPATTERN_NAME 

Two named subpatterns have the same name.

Since glibmm 2.16:
MALFORMED_PROPERTY 

Malformed "\\\\P" or "\\\\p" sequence.

Since glibmm 2.16:
UNKNOWN_PROPERTY 

Unknown property name after "\\\\P" or "\\\\p".

Since glibmm 2.16:
SUBPATTERN_NAME_TOO_LONG 

Subpattern name is too long (maximum 32 characters).

Since glibmm 2.16:
TOO_MANY_SUBPATTERNS 

Too many named subpatterns (maximum 10,000).

Since glibmm 2.16:
INVALID_OCTAL_VALUE 

Octal value is greater than "\\\\377".

Since glibmm 2.16:
TOO_MANY_BRANCHES_IN_DEFINE 

"DEFINE" group contains more than one branch.

Since glibmm 2.16:
DEFINE_REPETION 

Repeating a "DEFINE" group is not allowed.

This error is never raised.

Since glibmm 2.16:
Deprecated: 2.34.
INCONSISTENT_NEWLINE_OPTIONS 

Inconsistent newline options.

Since glibmm 2.16:
MISSING_BACK_REFERENCE 

"\\\\g" is not followed by a braced, angle-bracketed, or quoted name or number, or by a plain number.

Since glibmm 2.16:
INVALID_RELATIVE_REFERENCE 

Relative reference must not be zero.

Since glibmm 2.34:
BACKTRACKING_CONTROL_VERB_ARGUMENT_FORBIDDEN 

The backtracing control verb used does not allow an argument.

Since glibmm 2.34:
UNKNOWN_BACKTRACKING_CONTROL_VERB 

Unknown backtracing control verb.

Since glibmm 2.34:
NUMBER_TOO_BIG 

Number is too big in escape sequence.

Since glibmm 2.34:
MISSING_SUBPATTERN_NAME 

Missing subpattern name.

Since glibmm 2.34:
MISSING_DIGIT 

Missing digit.

Since glibmm 2.34:
INVALID_DATA_CHARACTER 

In JavaScript compatibility mode, "[" is an invalid data character.

Since glibmm 2.34:
EXTRA_SUBPATTERN_NAME 

Different names for subpatterns of the same number are not allowed.

Since glibmm 2.34:
BACKTRACKING_CONTROL_VERB_ARGUMENT_REQUIRED 

The backtracing control verb requires an argument.

Since glibmm 2.34:
INVALID_CONTROL_CHAR 

"\\\\c" must be followed by an ASCII character.

Since glibmm 2.34:
MISSING_NAME 

"\\\\k" is not followed by a braced, angle-bracketed, or quoted name.

Since glibmm 2.34:
NOT_SUPPORTED_IN_CLASS 

"\\\\N" is not supported in a class.

Since glibmm 2.34:
TOO_MANY_FORWARD_REFERENCES 

Too many forward references.

Since glibmm 2.34:
NAME_TOO_LONG 

The name is too long in "(*MARK)", "(*PRUNE)", "(*SKIP)", or "(*THEN)".

Since glibmm 2.34:
CHARACTER_VALUE_TOO_LARGE 

The character value in the \\u sequence is too large.

Since glibmm 2.34:

Constructor & Destructor Documentation

◆ RegexError() [1/2]

Glib::RegexError::RegexError ( Code  error_code,
const Glib::ustring error_message 
)

◆ RegexError() [2/2]

Glib::RegexError::RegexError ( GError *  gobject)
explicit

Member Function Documentation

◆ code()

Code Glib::RegexError::code ( ) const