Change request #774
Add error class and enum for loading resources
|Category:||-||Estimated time:||4.00 h|
|MFD revision:||Submitted by:|
At the moment, when we load a resource, we have no idea what fails except an error message thrown in an exception. This is convenient for the user but as the developer we needs more details on what actually happened. For example, when loading a sprite and the image could not be found, we won't parse the error message to deal with that kind of error. Having error code contained in the error class, we could also make more robust unit tests.
We need to implement this for all resources loaded at runtime, for the moment, focus on JSON based resources:
See in http://hg.malikania.fr/irccd/file/bfe72134286f/libirccd/irccd/daemon/server.hpp#l902 how it's implemented (using