pike.git / src / error.c

version» Context lines:

pike.git/src/error.c:1:   /*   || 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   #include "global.h"   #include "svalue.h"   #include "pike_macros.h"   #include "pike_error.h"   #include "interpret.h"   #include "stralloc.h"   #include "builtin_functions.h"   #include "array.h"   #include "object.h"   #include "main.h"   #include "builtin_functions.h"   #include "backend.h"   #include "operators.h"   #include "module_support.h"   #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)      PMOD_EXPORT const char msg_fatal_error[] =    "%s:%d: Fatal error:\n";   #ifdef PIKE_DEBUG   PMOD_EXPORT const char msg_unsetjmp_nosync_1[] =    "UNSETJMP out of sync! (last SETJMP at %s)!\n";   PMOD_EXPORT const char msg_unsetjmp_nosync_2[] =
pike.git/src/error.c:184:   };   int throw_severity;   static const char *in_error;      PMOD_EXPORT DECLSPEC(noreturn) void low_error(const char *buf) ATTRIBUTE((noreturn))   {    push_error(buf);    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. */   }      /* FIXME: NOTE: This function uses a static buffer.    * Check sizes of arguments passed!    */   void DECLSPEC(noreturn) va_error(const char *fmt, va_list args) ATTRIBUTE((noreturn))   {
pike.git/src/error.c:273:    push_int(0);    push_int(0);    }       if (name)    push_text(name);    else    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);       f_add(2);       f_aggregate(2);       free_svalue(& throw_value);    dmalloc_touch_svalue(Pike_sp-1);