Action #3474

Explicit error message in GModelSpectralFunc constructor from xml for file attribute absent or empty file

Added by Tibaldo Luigi 3 months ago.

Status:NewStart date:12/02/2020
Priority:NormalDue date:
Assigned To:-% Done:


Target version:2.0.0


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.


No recurrence.

Also available in: Atom PDF