sbmlteam / libsbml

LibSBML is a native library for reading, writing and manipulating files and data streams containing the Systems Biology Markup Language (SBML). It offers language bindings for C, C++, C#, Java, JavaScript, MATLAB, Perl, PHP, Python, R and Ruby.
https://sbml.org/software/libsbml
Other
39 stars 28 forks source link

Matlab OutputSBML fails with nondescript error #268

Closed tpfau closed 1 year ago

tpfau commented 2 years ago

Hi,

I'm currently encountering a situation, where the OutputSBML function in matlab fails with a nondescript error "Failed to write file". I'm wondering, whether it would be possible to make this output a bit more verbose. From my understanding, this could probably be done by retrieving the actual error log and appending it to the string of the error message. Something along the lines

SBMLErrorLog *log = sbmlDocument.getErrorLog();
reportError("OutputSBML:writeFile", log->toString(), gv);

instead of the original:

reportError("OutputSBML:writeFile", "Failed to write file", gv);

This would allow to better understand what might be going wrong, as I currently have no idea, where things might be going wrong since the struct itself seems to be fine.

skeating commented 1 year ago

added