NEURON
ocjump.h
Go to the documentation of this file.
1 #pragma once
2 union Inst;
3 struct Object;
4 union Objectdata;
5 struct Symlist;
6 
7 /** @brief How many NEURON try { ... } catch(...) { ... } blocks are in the call
8  * stack.
9  *
10  * Errors inside NEURON are triggered using hoc_execerror, which ultimately
11  * throws an exception. To replicate the old logic, we sometimes need to insert
12  * a try/catch block *only if* there is no try/catch block less deeply nested
13  * on the call stack. This global variable tracks how many such blocks are
14  * currently present on the stack.
15  */
16 extern int nrn_try_catch_nest_depth;
17 
18 /** @brief Helper type for incrementing/decrementing nrn_try_catch_nest_depth.
19  */
23  }
26  }
27 };
28 
29 struct ObjectContext {
32 
33  private:
36  int a4;
38 };
39 
40 struct OcJump {
41  static bool execute(Inst* p);
42  static bool execute(const char*, Object* ob = NULL);
43  static void* fpycall(void* (*) (void*, void*), void*, void*);
44  static void execute_throw_on_exception(Symbol* sym, int narg);
45  static void execute_throw_on_exception(Object* obj, Symbol* sym, int narg);
46 };
static int narg()
Definition: ivocvect.cpp:121
size_t p
int nrn_try_catch_nest_depth
How many NEURON try { ...
Definition: hoc.cpp:608
#define NULL
Definition: spdefs.h:105
Symlist * a5
Definition: ocjump.h:37
Objectdata * a2
Definition: ocjump.h:35
Object * a1
Definition: ocjump.h:34
ObjectContext(Object *)
Definition: ocjump.cpp:168
Definition: hocdec.h:173
Definition: ocjump.h:40
static bool execute(Inst *p)
Definition: ocjump.cpp:110
static void execute_throw_on_exception(Symbol *sym, int narg)
Definition: ocjump.cpp:145
static void * fpycall(void *(*)(void *, void *), void *, void *)
Definition: ocjump.cpp:157
Definition: model.h:47
Definition: hocdec.h:75
Helper type for incrementing/decrementing nrn_try_catch_nest_depth.
Definition: ocjump.h:20
Definition: hocdec.h:42