From 8a4b0e9bcefd447aabe62e7eb46473d07be9a207 Mon Sep 17 00:00:00 2001 From: h_vogt Date: Mon, 3 Jan 2011 20:37:36 +0000 Subject: [PATCH] add error checking --- ChangeLog | 3 +++ src/frontend/spiceif.c | 10 ++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 03e2682a6..54a998f70 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +11-01-03 Holger Vogt + * spiceif.c: add error checking for 'altermod' + 11-01-02 Dietmar Warning * math/fft/fftlib.c: inline functions to static * ngspice.h: __inline for _MSC_VER diff --git a/src/frontend/spiceif.c b/src/frontend/spiceif.c index 7a0add8a8..8627d5814 100644 --- a/src/frontend/spiceif.c +++ b/src/frontend/spiceif.c @@ -60,6 +60,8 @@ CDHW*/ #include "spiceif.h" #include "variable.h" +#include "error.h" + #ifdef XSPICE /* gtri - add - wbk - 11/9/90 - include MIF function prototypes */ #include "mifproto.h" @@ -935,8 +937,12 @@ if_setparam(CKTcircuit *ckt, char **name, char *param, struct dvec *val, int do_ Call only if CKTtime > 0 to avoid conflict with previous 'reset' command. May contain side effects because call is abundant. h_vogt 110101 */ - if ((do_model) && (ckt->CKTtime > 0)) - CKTtemp(ckt); + if ((do_model) && (ckt->CKTtime > 0)) { + int error = 0; + error = CKTtemp(ckt); + if (error) fprintf(stderr,"Error during changing a device model parameter!\n"); + if (error) controlled_exit(1); + } } static struct variable *