return human readable cairo error

This commit is contained in:
Dane Springmeyer 2013-07-22 16:21:18 -04:00
parent 4d3ab5e3aa
commit d1667c125c

View file

@ -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());
}