pike.git / src / error.c

version» Context lines:

pike.git/src/error.c:984:   /* Throw a preallocated error object.    *    * NOTE: The object MUST NOT have been cloned by a plain low_clone()!    * At least fast_clone_object() MUST have been used, or the object    * data must have been properly initialized in some other way!    */   /* coverity[+kill] */   PMOD_EXPORT DECLSPEC(noreturn) void throw_error_object(    struct object *o,    const char *func, -  struct svalue *base_sp, int args, +  const struct svalue *base_sp, int args,    const char *desc, ...) ATTRIBUTE((noreturn))   {    va_list foo;    va_start(foo,desc);    ASSERT_THREAD_SWAPPED_IN();    DWERROR("%s(): Throwing an error object\n", func);    ERROR_DONE(generic);   }      /* coverity[+kill] */   PMOD_EXPORT DECLSPEC(noreturn) void generic_error(    const char *func, -  struct svalue *base_sp, int args, +  const struct svalue *base_sp, int args,    const char *desc, ...) ATTRIBUTE((noreturn))   {    INIT_ERROR(generic);    ERROR_DONE(generic);   }      /* coverity[+kill] */   PMOD_EXPORT DECLSPEC(noreturn) void index_error(    const char *func, -  struct svalue *base_sp, int args, +  const struct svalue *base_sp, int args,    struct svalue *value,    struct svalue *index,    const char *desc, ...) ATTRIBUTE((noreturn))   {    INIT_ERROR(index);    ERROR_COPY_SVALUE(index, value);    ERROR_COPY_SVALUE(index, index);    ERROR_DONE(generic);   }      /* coverity[+kill] */   PMOD_EXPORT DECLSPEC(noreturn) void bad_arg_error(    const char *func, -  struct svalue *base_sp, int args, +  const struct svalue *base_sp, int args,    int which_argument,    const char *expected_type,    struct svalue *got_value,    const char *desc, ...) ATTRIBUTE((noreturn))   {    INIT_ERROR(bad_argument);    ERROR_COPY(bad_argument, which_argument);    if (expected_type)    ERROR_STRUCT(bad_argument,o)->expected_type =    make_shared_string(expected_type);
pike.git/src/error.c:1043:    ERROR_STRUCT(bad_argument,o)->expected_type = NULL;    ERROR_COPY_SVALUE(bad_argument, got_value);    DWERROR("%s():Bad arg %d (expected %s)\n",    func, which_argument, expected_type);    ERROR_DONE(generic);   }      /* coverity[+kill] */   PMOD_EXPORT DECLSPEC(noreturn) void math_error(    const char *func, -  struct svalue *base_sp, int args, +  const struct svalue *base_sp, int args,    struct svalue *number,    const char *desc, ...) ATTRIBUTE((noreturn))   {    INIT_ERROR(math);    if(number)    {    ERROR_COPY_SVALUE(math, number);    }else{    SET_SVAL(ERROR_STRUCT(math,o)->number, PIKE_T_INT, NUMBER_UNDEFINED,    integer, 0);    }    ERROR_DONE(generic);   }      /* coverity[+kill] */   PMOD_EXPORT DECLSPEC(noreturn) void resource_error(    const char *func, -  struct svalue *base_sp, int args, +  const struct svalue *base_sp, int args,    const char *resource_type,    size_t howmuch_,    const char *desc, ...) ATTRIBUTE((noreturn))   {    INT_TYPE howmuch = (INT_TYPE)howmuch_;    INIT_ERROR(resource);    ERROR_COPY(resource, howmuch);    ERROR_STRUCT(resource,o)->resource_type=make_shared_string(resource_type);    ERROR_DONE(generic);   }      PMOD_EXPORT DECLSPEC(noreturn) void out_of_memory_error (    const char *func, -  struct svalue *base_sp, int args, +  const struct svalue *base_sp, int args,    size_t amount)   {    resource_error (func, base_sp, args, "memory", amount,    amount ? msg_out_of_mem_2 : msg_out_of_mem, amount);   }      /* coverity[+kill] */   PMOD_EXPORT DECLSPEC(noreturn) void permission_error(    const char *func, -  struct svalue *base_sp, int args, +  const struct svalue *base_sp, int args,    const char *permission_type,    const char *desc, ...) ATTRIBUTE((noreturn))   {    INIT_ERROR(permission);    ERROR_STRUCT(permission,o)->permission_type=    make_shared_string(permission_type);    ERROR_DONE(generic);   }      /* coverity[+kill] */