Closed mardy closed 5 years ago
I was a bit surprised that _finish() threw a Glib::Error and not the subclass of it that is in _common.h . So, I was thinking about sending a PR for this so a quark can be used and also document it in the README.md .
Do you have any suggestion for how the API should look? A static method in the generated glib::Error subclass called domain()? I have not used glibmm's Glib::Quark before and only have some experience with it in Glib. Don't know what best practices there are.
Due to the design of
Glib::Error
, the developer needs to have a way to retrieve the error domain associated with the generated error classes. We should offer a static method which returns theGQuark
.Meanwhile, if RTTI is enabled, one can use
dynamic_cast
, with some pain.