Branch: Tag:

2003-11-14

2003-11-14 00:15:06 by Martin Stjernholm <mast@lysator.liu.se>

Cleanups in the compile exception handling.

Rev: src/cpp.c:1.125
Rev: src/cpp.h:1.8
Rev: src/language.yacc:1.326
Rev: src/preprocessor.h:1.60

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: language.yacc,v 1.325 2003/11/07 21:29:47 mast Exp $ + || $Id: language.yacc,v 1.326 2003/11/14 00:15:06 mast Exp $   */      %pure_parser
113:   /* This is the grammar definition of Pike. */      #include "global.h" - RCSID("$Id: language.yacc,v 1.325 2003/11/07 21:29:47 mast Exp $"); + RCSID("$Id: language.yacc,v 1.326 2003/11/14 00:15:06 mast Exp $");   #ifdef HAVE_MEMORY_H   #include <memory.h>   #endif
4094:    STACK_LEVEL_START(1);       if (SETJMP_SP(recovery, 1)) { -  struct svalue s; -  assign_svalue_no_free(&s, &throw_value); -  -  yyerror("Bad implicit enum value (failed to add 1)."); -  -  push_svalue(&s); -  low_safe_apply_handler("compile_exception", error_handler, compat_handler, 1); -  if (SAFE_IS_ZERO(Pike_sp-1)) yy_describe_exception(&s); -  pop_stack(); +  handle_compile_exception ("Bad implicit enum value (failed to add 1).");    push_int(0); -  free_svalue(&s); +     } else {    push_int(1);    f_add(2);
4137:    else    yyerror("Couldn't find module to import");    } -  else { -  struct svalue thrown = throw_value; -  throw_value.type = T_INT; -  my_yyerror("Error finding module to import"); -  push_svalue(&thrown); -  low_safe_apply_handler("compile_exception", error_handler, compat_handler, 1); -  if (SAFE_IS_ZERO(Pike_sp-1)) yy_describe_exception(&thrown); -  pop_stack(); -  free_svalue(&thrown); -  } +  else +  handle_compile_exception ("Error finding module to import");       return 0;   }