Boost C++ Libraries

PrevUpHomeNext

Type error

boost::taar::error — Error codes reported by Boost.Taar.

Synopsis

// In header: <boost/taar/core/error.hpp>



enum error { success = 0, no_absolute_template, invalid_template, 
             argument_not_found, argument_ambiguous, invalid_argument_format, 
             invalid_request_format, invalid_url_format, invalid_content_type, 
             invalid_cookie_format, invalid_boolean_format, 
             invalid_number_format, late_chunk_metadata, constraint_violated, 
             unknown_exception };

Description

All values share the error_category category, and they can be used transparently with boost::system::error_code thanks to the is_error_code_enum specialisation at the bottom of this header.

Many of these are reported as soft errors by session::http through its soft-error handler, which by default turns them into 400/404/415 HTTP responses.

success
No error.
no_absolute_template
A path template did not begin with '/'.
invalid_template
Path-template syntax error.
argument_not_found
A required argument was absent from the request.
argument_ambiguous
A header or query parameter occurred more than once.
invalid_argument_format
An argument could not be parsed to the requested type.
invalid_request_format
The request body could not be decoded.
invalid_url_format
The request URL could not be parsed.
invalid_content_type
The request Content-Type does not match the handler.
invalid_cookie_format
The Cookie header could not be parsed.
invalid_boolean_format
A boolean argument could not be parsed.
invalid_number_format
A numeric argument could not be parsed.
late_chunk_metadata
Chunked metadata was yielded after body data.
constraint_violated
An argument failed its declared constraints.
unknown_exception
A foreign exception that carries no error code.

PrevUpHomeNext