pike.git / src / error.c

version» Context lines:

pike.git/src/error.c:14:   #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.54 2000/07/07 01:43:32 hubbe Exp $"); + RCSID("$Id: error.c,v 1.55 2000/07/07 01:46:21 hubbe Exp $");      #undef ATTRIBUTE   #define ATTRIBUTE(X)         #ifdef PIKE_DEBUG   void check_recovery_context(void)   {    char foo;   #define TESTILITEST ((((char *)Pike_interpreter.recoveries)-((char *)&foo))*STACK_DIRECTION)
pike.git/src/error.c:104:    longjmp(Pike_interpreter.recoveries->recovery,1);   }      void push_error(char *description)   {    push_text(description);    f_backtrace(0);    f_aggregate(2);   }    - struct svalue throw_value = { T_INT }; + struct svalue throw_value = { PIKE_T_INT };   int throw_severity;   static const char *in_error;      void low_error(char *buf) ATTRIBUTE((noreturn))   {    push_error(buf);    free_svalue(& throw_value);    throw_value = *--Pike_sp;    throw_severity = THROW_ERROR;    in_error=0;
pike.git/src/error.c:293:    }       (void)VFPRINTF(stderr, fmt, args);       d_flag=t_flag=0;    if(Pike_sp && Pike_interpreter.evaluator_stack)    {    fprintf(stderr,"Attempting to dump backlog (may fail)...\n");    push_error("Backtrace at time of fatal:\n");    APPLY_MASTER("describe_backtrace",1); -  if(Pike_sp[-1].type==T_STRING) +  if(Pike_sp[-1].type==PIKE_T_STRING)    write_to_stderr(Pike_sp[-1].u.string->str, Pike_sp[-1].u.string->len);    }else{    fprintf(stderr,"No stack - no backtrace.\n");    }    fflush(stderr);    abort();   }      #if 1   
pike.git/src/error.c:389:   #define ERROR_STRUCT(STRUCT,O) \    ((struct PIKE_CONCAT(STRUCT,_error_struct) *)((O)->storage + PIKE_CONCAT(STRUCT,_error_offset)))      #define ERROR_COPY(STRUCT,X) \    ERROR_STRUCT(STRUCT,o)->X=X      #define ERROR_COPY_SVALUE(STRUCT,X) do { \    if (X) { \    assign_svalue_no_free( & ERROR_STRUCT(STRUCT,o)->X, X); \    } else { \ -  ERROR_STRUCT(STRUCT, o)->X.type = T_INT; \ +  ERROR_STRUCT(STRUCT, o)->X.type = PIKE_T_INT; \    ERROR_STRUCT(STRUCT, o)->X.subtype = 0; \    ERROR_STRUCT(STRUCT, o)->X.u.integer = 0; \    } \    } while (0)         #define ERROR_COPY_REF(STRUCT,X) \    add_ref( ERROR_STRUCT(STRUCT,o)->X=X )      
pike.git/src/error.c:441:    push_int(0);    push_text(func);       for (i=0;i<args;i++)    push_svalue(base_sp + i);    f_aggregate(args + 3);    f_aggregate(1);    f_add(2);    }    -  if(Pike_sp[-1].type!=T_ARRAY) +  if(Pike_sp[-1].type!=PIKE_T_ARRAY)    fatal("Error failed to generate a backtrace!\n");       ERROR_STRUCT(generic,o)->backtrace=Pike_sp[-1].u.array;    Pike_sp--;    dmalloc_touch_svalue(Pike_sp);       free_svalue(& throw_value); -  throw_value.type=T_OBJECT; +  throw_value.type=PIKE_T_OBJECT;    throw_value.u.object=o;    throw_severity = THROW_ERROR;    in_error=0;    pike_throw(); /* Hope someone is catching, or we will be out of balls. */   }      void generic_error(    char *func,    struct svalue *base_sp, int args,    char *desc, ...) ATTRIBUTE((noreturn,format (printf, 4, 5)))
pike.git/src/error.c:493:    struct svalue *got,    char *desc, ...) ATTRIBUTE((noreturn,format (printf, 7, 8)))   {    INIT_ERROR(bad_arg);    ERROR_COPY(bad_arg, which_arg);    ERROR_STRUCT(bad_arg,o)->expected_type=make_shared_string(expected_type);    if(got)    {    ERROR_COPY_SVALUE(bad_arg, got);    }else{ -  ERROR_STRUCT(bad_arg,o)->got.type=T_INT; +  ERROR_STRUCT(bad_arg,o)->got.type=PIKE_T_INT;    ERROR_STRUCT(bad_arg,o)->got.subtype=NUMBER_UNDEFINED;    ERROR_STRUCT(bad_arg,o)->got.u.integer=0;    }    DWERROR((stderr, "%s():Bad arg %d (expected %s)\n",    func, which_arg, expected_type));    ERROR_DONE(generic);   }      void math_error(    char *func,    struct svalue *base_sp, int args,    struct svalue *number,    char *desc, ...) ATTRIBUTE((noreturn,format (printf, 5, 6)))   {    INIT_ERROR(math);    if(number)    {    ERROR_COPY_SVALUE(math, number);    }else{ -  ERROR_STRUCT(math,o)->number.type=T_INT; +  ERROR_STRUCT(math,o)->number.type=PIKE_T_INT;    ERROR_STRUCT(math,o)->number.subtype=NUMBER_UNDEFINED;    ERROR_STRUCT(math,o)->number.u.integer=0;    }    ERROR_DONE(generic);   }      void resource_error(    char *func,    struct svalue *base_sp, int args,    char *resource_type,