Skip to content
Snippets Groups Projects
Select Git revision
  • 8f797ab27fd39e7aaee2cc0790d96e8d5ae2037e
  • master default protected
  • 9.0
  • 8.0
  • 7.8
  • 7.6
  • 7.4
  • 7.2
  • 7.0
  • 0.6
  • rosuav/latex-markdown-renderer
  • rxnpatch/rxnpatch
  • marcus/gobject-introspection
  • rxnpatch/8.0
  • rosuav/pre-listening-ports
  • nt-tools
  • rosuav/async-annotations
  • rosuav/pgsql-ssl
  • rxnpatch/rxnpatch-broken/2023-10-06T094250
  • grubba/fdlib
  • grubba/wip/sakura/8.0
  • v8.0.2000
  • v8.0.1998
  • v8.0.1996
  • v8.0.1994
  • v8.0.1992
  • v8.0.1990
  • v8.0.1988
  • v8.0.1986
  • rxnpatch/clusters/8.0/2025-04-29T124414
  • rxnpatch/2025-04-29T124414
  • v8.0.1984
  • v8.0.1982
  • v8.0.1980
  • v8.0.1978
  • v8.0.1976
  • v8.0.1974
  • v8.0.1972
  • v8.0.1970
  • v8.0.1968
  • v8.0.1966
41 results

module.h

Blame
  • error.c 11.31 KiB
    /*\
    ||| 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"
    #include "pike_macros.h"
    #include "error.h"
    #include "interpret.h"
    #include "stralloc.h"
    #include "builtin_functions.h"
    #include "array.h"
    #include "object.h"
    #include "main.h"
    #include "builtin_functions.h"
    #include "backend.h"
    #include "operators.h"
    #include "module_support.h"
    #include "threads.h"
    
    RCSID("$Id: error.c,v 1.44 2000/04/04 15:39:13 grubba Exp $");
    
    #undef ATTRIBUTE
    #define ATTRIBUTE(X)
    
    JMP_BUF *recoveries=0;
    
    #ifdef PIKE_DEBUG
    void check_recovery_context(void)
    {
      char foo;
    #define TESTILITEST ((((char *)recoveries)-((char *)&foo))*STACK_DIRECTION)
      if(recoveries && TESTILITEST > 0)
        fatal("Recoveries is out biking (recoveries=%p, sp=%p, %d)!\n",recoveries, &foo,TESTILITEST);
    
      /* Add more stuff here when required */
    }
    
    void pike_gdb_breakpoint(void) 
    {
    }
    #endif
    
    JMP_BUF *init_recovery(JMP_BUF *r DEBUG_LINE_ARGS)
    {
      check_recovery_context();
    #ifdef PIKE_DEBUG
      r->line=line;
      r->file=file;
      OED_FPRINTF((stderr, "init_recovery(%p) %s:%d\n", r, file, line));
    #endif
      r->fp=fp;
      r->sp=sp-evaluator_stack;
      r->mark_sp=mark_sp - mark_stack;
      r->previous=recoveries;
      r->onerror=0;
      r->severity=THROW_ERROR;
      recoveries=r;
      check_recovery_context();
      return r;
    }
    
    void pike_throw(void) ATTRIBUTE((noreturn))
    {
      while(recoveries && throw_severity > recoveries->severity)
      {
        while(recoveries->onerror)
        {
          (*recoveries->onerror->func)(recoveries->onerror->arg);