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.
It would be nice to have access to the error log from the C API.
My use case is that I might get some errors from some checks/conversion. I will then fix them and re-run those checks/conversion.
If I do that, calling SBMLDocument_getNumErrors(doc) will count the errors from both checks/conversion runs whereas I only want the ones from the second run.
For most checks, I can rely on the number of errors returned by the check and compute the offset of the first relevant error.
However, the conversion returns a boolean instead of a number of errors so I cannot do that. I still found a workaround in that case, the level and version converter actually clears the log (except in case of early return) so I can set the offset to 0.
Still, I think that being able to clear the log from the C API would be nice. While there is an API to clear the log, there is no way to retrieve the log object from a document.
It would be nice to have access to the error log from the C API.
My use case is that I might get some errors from some checks/conversion. I will then fix them and re-run those checks/conversion. If I do that, calling
SBMLDocument_getNumErrors(doc)
will count the errors from both checks/conversion runs whereas I only want the ones from the second run.For most checks, I can rely on the number of errors returned by the check and compute the offset of the first relevant error. However, the conversion returns a boolean instead of a number of errors so I cannot do that. I still found a workaround in that case, the level and version converter actually clears the log (except in case of early return) so I can set the offset to 0.
Still, I think that being able to clear the log from the C API would be nice. While there is an API to clear the log, there is no way to retrieve the log object from a document.
So my request would be to add something like:
I am not sure about
SBMLErrorLog_t
since it doesn't exist at the moment. ReturningXMLErrorLog_t
instead would be fine for my use case.What do you think?