Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2024-11-15 09:30:35

0001 /* Copyright (c) 2018-2023 Marcelo Zimbres Silva (mzimbres@gmail.com)
0002  *
0003  * Distributed under the Boost Software License, Version 1.0. (See
0004  * accompanying file LICENSE.txt)
0005  */
0006 
0007 #ifndef BOOST_REDIS_ERROR_HPP
0008 #define BOOST_REDIS_ERROR_HPP
0009 
0010 #include <boost/system/error_code.hpp>
0011 
0012 namespace boost::redis {
0013 
0014 /** \brief Generic errors.
0015  *  \ingroup high-level-api
0016  */
0017 enum class error
0018 {
0019    /// Invalid RESP3 type.
0020    invalid_data_type = 1,
0021 
0022    /// Can't parse the string as a number.
0023    not_a_number,
0024 
0025    /// The maximum depth of a nested response was exceeded.
0026    exceeeds_max_nested_depth,
0027 
0028    /// Got non boolean value.
0029    unexpected_bool_value,
0030 
0031    /// Expected field value is empty.
0032    empty_field,
0033 
0034    /// Expects a simple RESP3 type but got an aggregate.
0035    expects_resp3_simple_type,
0036 
0037    /// Expects aggregate.
0038    expects_resp3_aggregate,
0039 
0040    /// Expects a map but got other aggregate.
0041    expects_resp3_map,
0042 
0043    /// Expects a set aggregate but got something else.
0044    expects_resp3_set,
0045 
0046    /// Nested response not supported.
0047    nested_aggregate_not_supported,
0048 
0049    /// Got RESP3 simple error.
0050    resp3_simple_error,
0051 
0052    /// Got RESP3 blob_error.
0053    resp3_blob_error,
0054 
0055    /// Aggregate container has incompatible size.
0056    incompatible_size,
0057 
0058    /// Not a double
0059    not_a_double,
0060 
0061    /// Got RESP3 null.
0062    resp3_null,
0063 
0064    /// There is no stablished connection.
0065    not_connected,
0066 
0067    /// Resolve timeout
0068    resolve_timeout,
0069 
0070    /// Connect timeout
0071    connect_timeout,
0072 
0073    /// Connect timeout
0074    pong_timeout,
0075 
0076    /// SSL handshake timeout
0077    ssl_handshake_timeout,
0078 
0079    /// Can't receive push synchronously without blocking
0080    sync_receive_push_failed,
0081 
0082    /// Incompatible node depth.
0083    incompatible_node_depth,
0084 };
0085 
0086 /** \internal
0087  *  \brief Creates a error_code object from an error.
0088  *  \param e Error code.
0089  *  \ingroup any
0090  */
0091 auto make_error_code(error e) -> system::error_code;
0092 
0093 } // boost::redis
0094 
0095 namespace std {
0096 
0097 template<>
0098 struct is_error_code_enum<::boost::redis::error> : std::true_type {};
0099 
0100 } // std
0101 
0102 #endif // BOOST_REDIS_ERROR_HPP