Branch: Tag:

2001-08-15

2001-08-15 22:18:00 by Martin Stjernholm <mast@lysator.liu.se>

Added throw_error_object to throw any error object that inherits
generic_error_program.

Rev: src/error.c:1.74
Rev: src/pike_error.h:1.13

22:   #include "threads.h"   #include "gc.h"    - RCSID("$Id: error.c,v 1.73 2001/07/01 21:34:50 mast Exp $"); + RCSID("$Id: error.c,v 1.74 2001/08/15 22:18:00 mast Exp $");      #undef ATTRIBUTE   #define ATTRIBUTE(X)
556:    pike_throw(); /* Hope someone is catching, or we will be out of balls. */   }    +  + PMOD_EXPORT DECLSPEC(noreturn) void throw_error_object( +  struct object *o, +  char *func, +  struct svalue *base_sp, int args, +  char *desc, ...) ATTRIBUTE((noreturn,format (printf, 5, 6))) + { +  va_list foo; +  va_start(foo,desc); +  ASSERT_THREAD_SWAPPED_IN(); +  DWERROR((stderr, "%s(): Throwing an error object\n", func)); +  ERROR_DONE(generic); + } +    PMOD_EXPORT DECLSPEC(noreturn) void generic_error(    char *func,    struct svalue *base_sp, int args,