Branch: Tag:

2003-09-19

2003-09-19 12:24:59 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Added some paranoia to new_error().
Bad svalues (eg lvalues) are no longer put into the argument array.

Rev: src/error.c:1.116

2:   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: error.c,v 1.115 2003/09/08 20:05:20 mast Exp $ + || $Id: error.c,v 1.116 2003/09/19 12:24:59 grubba Exp $   */      #define NO_PIKE_SHORTHAND
23:   #include "threads.h"   #include "gc.h"    - RCSID("$Id: error.c,v 1.115 2003/09/08 20:05:20 mast Exp $"); + RCSID("$Id: error.c,v 1.116 2003/09/19 12:24:59 grubba Exp $");      #undef ATTRIBUTE   #define ATTRIBUTE(X)
191:    free_svalue(& throw_value);    dmalloc_touch_svalue(Pike_sp-1);    throw_value = *--Pike_sp; +  dmalloc_touch_svalue(&throw_value); +     throw_severity = THROW_ERROR;    in_error=0;    pike_throw(); /* Hope someone is catching, or we will be out of balls. */
280:    push_int(0);       for (i=-args; i; i++) { +  if (oldsp[i].type <= PIKE_T_FLOAT) {    push_svalue(oldsp + i); -  +  } else { +  char buffer[50]; +  sprintf(buffer, "<Svalue:0x%04x:0x%04x:%p>", +  oldsp[i].type, oldsp[i].subtype, oldsp[i].u.ptr); +  push_text(buffer);    } -  +  }       f_aggregate(args + 3);    f_aggregate(1);