Branch: Tag:

1999-05-01

1999-05-01 17:25:49 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Improved error reporting in case f_index() throws an error.

Rev: src/las.c:1.79

5:   \*/   /**/   #include "global.h" - RCSID("$Id: las.c,v 1.78 1999/03/26 23:40:56 grubba Exp $"); + RCSID("$Id: las.c,v 1.79 1999/05/01 17:25:49 grubba Exp $");      #include "language.h"   #include "interpret.h"
774:    }else{    SET_CYCLIC_RET(1);    ref_push_string(id); +  { +  struct svalue *save_sp = sp-2; +  JMP_BUF recovery; +  if (SETJMP(recovery)) { +  /* f_index() threw an error! +  * +  * FIXME: Report the error thrown. +  */ +  if (sp > save_sp) { +  pop_n_elems(sp - save_sp); +  } else if (sp != save_sp) { +  fatal("f_index() munged stack!\n"); +  } +  push_int(0); +  sp[-1].subtype = NUMBER_UNDEFINED; +  } else {    f_index(2); -  +  } +  }       if(sp[-1].type == T_INT &&    !sp[-1].u.integer &&