Unverified Commit 63c09484 authored by Miroslav Kratochvil's avatar Miroslav Kratochvil Committed by GitHub
Browse files

Merge pull request #126 from giordano/mg/operation-return-value

Fix checking of errors in `libsbml_convert`
parents 68e0e0b5 fa4446f0
......@@ -46,7 +46,9 @@ libsbml_convert(
)
end
check_errors(
ccall(sbml(:SBMLDocument_convert), Cint, (VPtr, VPtr), doc, props),
# `SBMLDocument_convert` returns `LIBSBML_OPERATION_SUCCESS` (== 0) for a
# successful operation, something else when there is a failure.
iszero(ccall(sbml(:SBMLDocument_convert), Cint, (VPtr, VPtr), doc, props)),
doc,
ErrorException("Conversion returned errors"),
)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment