From 8b8f7ab5b98d3e2a3dd3449dbe8e7a225ca98939 Mon Sep 17 00:00:00 2001 From: Holger Vogt Date: Fri, 17 Jan 2020 23:38:40 +0100 Subject: [PATCH] if inp_spsource() returns with an error code, emit a message --- src/main.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main.c b/src/main.c index 47326fc99..eaebb7843 100644 --- a/src/main.c +++ b/src/main.c @@ -1306,7 +1306,9 @@ int main(int argc, char **argv) if (tempfile && (!err || !ft_batchmode)) { /* Copy the input file name for becoming another file search path */ - inp_spsource(tempfile, FALSE, dname, FALSE); + if (inp_spsource(tempfile, FALSE, dname, FALSE) != 0) { + fprintf(stderr, " Simulation interrupted due to error!\n\n"); + } tfree(dname); gotone = TRUE; } @@ -1318,7 +1320,9 @@ int main(int argc, char **argv) } /* --- if (!ft_servermode) --- */ if (!gotone && ft_batchmode) { - inp_spsource(circuit_file, FALSE, NULL, FALSE); + if (inp_spsource(circuit_file, FALSE, NULL, FALSE) != 0) { + fprintf(stderr, " Simulation interrupted due to error!\n\n"); + } } }