Mercurial > hg > octave-nkf
changeset 1877:6f70b6929cc1
[project @ 1996-02-04 14:01:12 by jwe]
author | jwe |
---|---|
date | Sun, 04 Feb 1996 14:01:38 +0000 |
parents | 3eeb7826e298 |
children | aa2bcaefbc5a |
files | liboctave/NPSOL.cc liboctave/f77-fcn.h |
diffstat | 2 files changed, 11 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/NPSOL.cc +++ b/liboctave/NPSOL.cc @@ -285,10 +285,9 @@ istate, c, cjac, pclambda, objf, objgrd, r, px, iw, leniw, w, lenw)); - // XXX FIXME XXX -- need to know if an exception that resulted - // in a call to xstopx has occurred... - - if (inform == 6 || inform == 1) + if (f77_exception_encountered) + (*current_liboctave_error_handler) ("unrecoverable error in npsol"); + else if (inform == 6 || inform == 1) continue; else break;
--- a/liboctave/f77-fcn.h +++ b/liboctave/f77-fcn.h @@ -67,10 +67,14 @@ do \ { \ jmp_buf saved_f77_context; \ + f77_exception_encountered = 0; \ copy_f77_context ((char *) f77_context, (char *) saved_f77_context, \ sizeof (jmp_buf)); \ if (setjmp (f77_context)) \ - F77_XFCN_ERROR (f, F); \ + { \ + f77_exception_encountered = 1; \ + F77_XFCN_ERROR (f, F); \ + } \ else \ F77_FCN (f, F) args; \ copy_f77_context ((char *) saved_f77_context, (char *) f77_context, \ @@ -78,6 +82,9 @@ } \ while (0) +/* So we can check to see if an exception has occurred. */ +extern int f77_exception_encountered; + /* For setjmp/longjmp. */ extern jmp_buf f77_context;