Branch: Tag:

2004-04-18

2004-04-18 02:19:38 by Martin Stjernholm <mast@lysator.liu.se>

First steps in making the internal error objects visible.

Rev: lib/modules/Error.pmod:1.1
Rev: src/dynamic_load.c:1.83
Rev: src/error.c:1.121
Rev: src/errors.h:1.26

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: dynamic_load.c,v 1.82 2004/04/15 13:21:25 grubba Exp $ + || $Id: dynamic_load.c,v 1.83 2004/04/18 02:19:38 mast Exp $   */      #ifdef TESTING
24:   # include "lex.h"   # include "object.h"    - RCSID("$Id: dynamic_load.c,v 1.82 2004/04/15 13:21:25 grubba Exp $"); + RCSID("$Id: dynamic_load.c,v 1.83 2004/04/18 02:19:38 mast Exp $");      #else /* TESTING */   
463:       if(!module)    { -  struct object *err_obj = low_clone (dlopen_error_program); - #define DLERR_STRUCT(OBJ) \ -  ((struct dlopen_error_struct *) (err_obj->storage + dlopen_error_offset)) +  struct object *err_obj = low_clone (module_load_error_program); + #define LOADERR_STRUCT(OBJ) \ +  ((struct module_load_error_struct *) (err_obj->storage + module_load_error_offset))       const char *err = dlerror();    if (err) {
477:    else    push_constant_text ("Unknown reason");    -  add_ref (DLERR_STRUCT (err_obj)->path = Pike_sp[-args - 1].u.string); -  add_ref (DLERR_STRUCT (err_obj)->dlerror = Pike_sp[-1].u.string); +  add_ref (LOADERR_STRUCT (err_obj)->path = Pike_sp[-args - 1].u.string); +  add_ref (LOADERR_STRUCT (err_obj)->reason = Pike_sp[-1].u.string);       if (Pike_sp[-args].u.string->len < 1024) {    throw_error_object (err_obj, "load_module", Pike_sp - args - 1, args,