Explicit error message in GModelSpectralFunc constructor from xml for file attribute absent or empty file
|Assigned To:||-||% Done:|
Currently when a GModelSpectralFunc is built from an XML file there is no explicit error message thrown by GModelSpectralFunc::read if there is no file attribute, or by GModelSpectralFunc::load_nodes if the file exists but it is empty. In both cases the model is initialised with empty energy node and value vectors. This results in errors when the model is used later, but the error message thrown then is not very easy to trace back to its root cause.
I think it could be useful to add error messages covering these two cases more transparent for the user.