Functions for handling Eina errors. More...
Data Structures | |
struct | efl::eina::error_category |
Specialized error category for Eina errors. More... | |
Typedefs | |
typedef std::error_category | efl::eina::system_error_category |
std::error_category for Eina errors. More... | |
Enumerations | |
enum | efl::eina::error_type |
Typesafe representation of an Eina_Error . More... | |
Functions | |
Eina_Error | efl::eina::unknown_error () |
Return a Eina_Error for an unknown error. More... | |
system_error_category const & | efl::eina::get_generic_category () |
Gets a std::generic_category instance as a eina::system_error_category . More... | |
system_error_category const & | efl::eina::get_system_category () |
Gets a std::system_category instance as a eina::system_error_category . More... | |
eina::system_error_category & | efl::eina::eina_error_category () |
Get a default eina::error_category object. More... | |
eina::error_code | efl::eina::get_error_code () |
Gets the error code for the last Eina error. More... | |
void | efl::eina::set_error_code (eina::error_code const &e) |
Sets an error code in the Eina library. More... | |
eina::error_condition | efl::eina::get_error_condition () |
Gets the error condition for the last Eina error. More... | |
error_type | efl::eina::get_error_code_enum () |
Gets the enum value of the last Eina error. More... | |
void | efl::eina::throw_on_error () |
Throw an exception if there is a error set in Eina library. More... | |
Functions for handling Eina errors.
Integrates the Eina errors with the standard error representation defined in the system_error
library.
typedef std::error_category efl::eina::system_error_category |
std::error_category
for Eina errors.
Typesafe representation of an Eina_Error
.
Used for improved compatibility with system_error library.
|
inline |
Return a Eina_Error
for an unknown error.
Eina_Error
indicating a unknown/external error condition.This function returns an Eina_Error
indicating a unknown/external error condition. When first called, this function will register the said error within the other Eina errors, together with a error message.
References eina_error_msg_static_register().
Referenced by efl::eina::set_error_code().
|
inline |
Gets a std::generic_category
instance as a eina::system_error_category
.
std::generic_category
instance as a eina::system_error_category
.
|
inline |
Gets a std::system_category
instance as a eina::system_error_category
.
std::system_category
instance as a eina::system_error_category
.
|
inline |
Get a default eina::error_category
object.
eina::error_category
. Referenced by efl::eina::get_error_code(), efl::eina::get_error_condition(), and efl::eina::set_error_code().
|
inline |
Gets the error code for the last Eina error.
eina::error_code
for the last Eina error.This function gets the error code for the last Eina error and consumes it. The category of the returned eina::error_code
is eina_error_category
.
eina::error_code
to indicates that there is no unconsumed error. References efl::eina::eina_error_category(), eina_error_get(), and eina_error_set().
Referenced by efl::eina::accessor< T, typename std::enable_if< ! std::is_base_of<::efl::eo::concrete, T >::value, T >::type >::operator[](), efl::eina::accessor< T, typename std::enable_if< std::is_base_of<::efl::eo::concrete, T >::value, T >::type >::operator[](), efl::eina::thread::thread(), and efl::eina::throw_on_error().
|
inline |
Sets an error code in the Eina library.
e | Error code. Should be an eina_error_category error. |
This function sets an error code in the Eina library. If the category of the given error code is not eina_error_category
it will register an unknown error instead.
References efl::eina::eina_error_category(), eina_error_set(), and efl::eina::unknown_error().
|
inline |
Gets the error condition for the last Eina error.
eina::error_condition
for the last Eina error.This function works exactly like get_error_code but returns an eina::error_condition
object instead.
References efl::eina::eina_error_category(), eina_error_get(), and eina_error_set().
|
inline |
Gets the enum value of the last Eina error.
error_type
.This function returns the error code for the last Eina error.
Differently from get_error_code and get_error_condition, this function does not consume the last error.
References eina_error_get().
|
inline |
Throw an exception if there is a error set in Eina library.
<tt>eina::system_error</tt> | containing the error identifier. |
This function is meant to be used after executing a operation that may set an Eina error. If an error code has been set this function will throw an exception.
The thrown exception holds an eina::error_code
equivalent to the one returned by get_error_code.
Like the get_error_code function, this one consumes the last error code.
References efl::eina::get_error_code().