pike.git / src / las.c

version» Context lines:

pike.git/src/las.c:1:   /*\   ||| This file a part of Pike, and is copyright by Fredrik Hubinette   ||| Pike is distributed as GPL (General Public License)   ||| See the files COPYING and DISCLAIMER for more information.   \*/   /**/   #include "global.h" - RCSID("$Id: las.c,v 1.262 2001/08/13 23:15:57 mast Exp $"); + RCSID("$Id: las.c,v 1.263 2001/08/15 20:58:44 mast Exp $");      #include "language.h"   #include "interpret.h"   #include "las.h"   #include "array.h"   #include "object.h"   #include "stralloc.h"   #include "dynamic_buffer.h"   #include "lex.h"   #include "pike_types.h"
pike.git/src/las.c:1684:   node *index_node(node *n, char *node_name, struct pike_string *id)   {    node *ret;    JMP_BUF tmp;       check_tree(n,0);       if(SETJMP(tmp))    {    struct svalue s; -  +     assign_svalue_no_free(&s, &throw_value); -  call_handle_error(); +        if (node_name) {    my_yyerror("Couldn't index module '%s'.", node_name);    } else {    yyerror("Couldn't index module.");    } -  if ((s.type == T_ARRAY) && s.u.array->size && -  (s.u.array->item[0].type == T_STRING)) { -  /* Old-style backtrace */ -  my_yyerror("Error: '%s'.", s.u.array->item[0].u.string->str); -  } else if (s.type == T_OBJECT) { -  struct generic_error_struct *ge; -  if ((ge = (struct generic_error_struct *) -  get_storage(s.u.object, generic_error_program))) { -  my_yyerror("Error: '%s'.", ge->desc->str); -  } -  } +  +  push_svalue(&s); +  safe_apply_handler("compile_exception", error_handler, compat_handler, 1); +  if (IS_ZERO(sp-1)) yy_describe_exception(&s); +  pop_stack();    free_svalue(&s);    }else{    resolv_constant(n);    switch(Pike_sp[-1].type)    {    case T_INT:    if(!Pike_compiler->num_parse_error) {    if (node_name) {    my_yyerror("Failed to index module '%s' with '%s' "    "(module doesn't exist?)",