Public Member Functions | Public Attributes | List of all members
BPrivate::Network::BHttpFields::InvalidInput Class Reference

Error that represents when a string input contains characters that are incompatible with the HTTP specification. More...

Inherits BPrivate::Network::BError.

Public Member Functions

 InvalidInput (const char *origin, BString input)
 Constructor that sets the origin and the invalid input. More...
 
virtual BString DebugMessage () const override
 Retrieve a debug message that contains all info in this error. More...
 
virtual const char * Message () const noexcept override
 Get a pointer to the message describing the error. More...
 
- Public Member Functions inherited from BPrivate::Network::BError
 BError (BError &&error) noexcept
 Move constructor. More...
 
 BError (BString origin)
 Constructor that sets the origin. More...
 
 BError (const BError &error)
 Copy constructor. More...
 
 BError (const char *origin)
 Constructor that sets the origin. More...
 
virtual ~BError () noexcept
 Standard destructor. More...
 
BErroroperator= (BError &&error) noexcept
 Move assignment operator. More...
 
BErroroperator= (const BError &error)
 Copy assignment operator. More...
 
virtual const char * Origin () const noexcept
 Access the string representation of the origin of the error. More...
 
size_t WriteToOutput (BDataIO *output) const
 Write the error description to an output. More...
 
void WriteToStream (std::ostream &stream) const
 Write the error description to an output stream. More...
 

Public Attributes

BString input
 The input that contains the invalid contents. More...
 

Detailed Description

Error that represents when a string input contains characters that are incompatible with the HTTP specification.

Since
Haiku R1

Constructor & Destructor Documentation

◆ InvalidInput()

BPrivate::Network::BHttpFields::InvalidInput::InvalidInput ( const char *  origin,
BString  input 
)

Constructor that sets the origin and the invalid input.

Since
Haiku R1

Member Function Documentation

◆ DebugMessage()

BString BPrivate::Network::BHttpFields::InvalidInput::DebugMessage ( ) const
overridevirtual

Retrieve a debug message that contains all info in this error.

The output will be along the lines of:

[Origin] Invalid format or unsupported characters in input [input]
Exceptions
std::bad_allocIn the future this method may throw this exception when the memory for the debug message cannot be allocated.
Returns
A BString object that contains the debug message.
Since
Haiku R1

Reimplemented from BPrivate::Network::BError.

◆ Message()

const char * BPrivate::Network::BHttpFields::InvalidInput::Message ( ) const
overridevirtualnoexcept

Get a pointer to the message describing the error.

Since
Haiku R1

Implements BPrivate::Network::BError.

Member Data Documentation

◆ input

BString BPrivate::Network::BHttpFields::InvalidInput::input

The input that contains the invalid contents.

Since
Haiku R1
BPrivate::Network::BHttpFields::InvalidInput::input
BString input
The input that contains the invalid contents.
Definition: HttpFields.h:82
BPrivate::Network::BError::Origin
virtual const char * Origin() const noexcept
Access the string representation of the origin of the error.