ipaddress 1.1.0
Loading...
Searching...
No Matches
parse_error Class Reference

Exception for errors encountered during IP address parsing. More...

#include <errors.hpp>

Inheritance diagram for parse_error:

Public Member Functions

template<typename FirstArg , typename... Args>
 parse_error (error_code code, const FirstArg &arg, const Args &... args)
 Constructs a parsing error with a code and a concatenated message from multiple arguments.
 
 parse_error (error_code code, const std::string &message)
 Constructs a parsing error with a code and a message string.
 
 parse_error (error_code code, const char *message)
 Constructs a parsing error with a code and a message C-string.
 
error_code code () const noexcept
 Returns the error code associated with this error.
 

Detailed Description

Exception for errors encountered during IP address parsing.

This exception is thrown when the library encounters an error while attempting to parse an IP address or network from a string. It is a specialized form of the error class that provides context specific to parsing operations.

See also
error

Constructor & Destructor Documentation

◆ parse_error() [1/3]

template<typename FirstArg , typename... Args>
parse_error ( error_code code,
const FirstArg & arg,
const Args &... args )
inlineexplicit

Constructs a parsing error with a code and a concatenated message from multiple arguments.

Template Parameters
FirstArgThe type of the first argument passed to the constructor.
ArgsThe types of the additional arguments passed to the constructor.
Parameters
[in]codeThe error code associated with the parsing exception.
[in]argThe first argument describing the error.
[in]argsAdditional arguments describing the error.

◆ parse_error() [2/3]

parse_error ( error_code code,
const std::string & message )
inlineexplicit

Constructs a parsing error with a code and a message string.

Parameters
[in]codeThe error code associated with the parsing exception.
[in]messageA detailed description of the parsing error.

◆ parse_error() [3/3]

parse_error ( error_code code,
const char * message )
inlineexplicit

Constructs a parsing error with a code and a message C-string.

Parameters
[in]codeThe error code associated with the parsing exception.
[in]messageA detailed description of the parsing error.

Member Function Documentation

◆ code()

error_code code ( ) const
inlinenoexceptinherited

Returns the error code associated with this error.

Returns
The error code that represents the specific error condition.

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