From 5b77329f7ce9e6418166e873f2161c307517812c Mon Sep 17 00:00:00 2001 From: "Frank T. Bergmann" Date: Wed, 31 Aug 2022 10:43:26 +0200 Subject: [PATCH] #268 provide detailed error message on failure --- src/bindings/matlab/OutputSBML.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/bindings/matlab/OutputSBML.cpp b/src/bindings/matlab/OutputSBML.cpp index baa19aac89..c86c682ce4 100644 --- a/src/bindings/matlab/OutputSBML.cpp +++ b/src/bindings/matlab/OutputSBML.cpp @@ -292,7 +292,10 @@ mexFunction (int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) if (nStatus != 1) { - reportError("OutputSBML:writeFile", "Failed to write file", gv); + std::stringstream str; + str << "Failed to write file" << std::endl << std::endl; + str << sbmlDocument.getErrorLog()->toString(); + reportError("OutputSBML:writeFile", str.str(), gv); } else {