return human readable cairo error
This commit is contained in:
parent
4d3ab5e3aa
commit
d1667c125c
1 changed files with 2 additions and 2 deletions
|
@ -59,7 +59,7 @@ typedef cairo_status_t ErrorStatus;
|
|||
/// Throws the appropriate exception, if exceptions are enabled.
|
||||
inline void throw_exception(ErrorStatus status)
|
||||
{
|
||||
throw std::runtime_error("cairo: fixme");
|
||||
throw std::runtime_error(std::string("cairo: ") + cairo_status_to_string(status));
|
||||
}
|
||||
|
||||
//We inline this because it is called so often.
|
||||
|
@ -70,7 +70,7 @@ inline void check_status_and_throw_exception(ErrorStatus status)
|
|||
}
|
||||
|
||||
template<class T>
|
||||
void check_object_status_and_throw_exception(const T& object)
|
||||
void check_object_status_and_throw_exception(T const& object)
|
||||
{
|
||||
check_status_and_throw_exception(object.get_status());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue