Loading...
Searching...
No Matches
defaultSigZone.hpp
Go to the documentation of this file.
1
2#pragma once
3
7
8namespace by {
9 template <typename W> class defaultSigZone: public sigZone {
10 BY(ME(defaultSigZone, sigZone))
11
12 public:
13 defaultSigZone(const W& worker):
14 super([&](const baseErr& e) {
16 zone.setEnable(true);
17
18 logger& log = logger::get();
19 log.logBypass("\n* * *\n");
20 log.logBypass("unexpected exception found: ");
21 e.dump();
22
23 if(worker.isFlag(W::LOG_STRUCTURE)) {
24 log.logBypass("\ncurrent frames:\n");
25 thread::get().getFrames();
26 }
27
28 if(worker.isFlag(W::LOG_GRAPH_ON_EX)) {
29 log.logBypass("\ngraph:\n");
30 graphVisitor().setFlag(0).setTask(worker.getTask()).work();
31 }
32
33 // signale will *terminate* the process after all.
34 }) {}
35 };
36}
Base class for error hierarchy.
Definition baseErr.hpp:48
Definition defaultSigZone.hpp:9
AST graph visualization visitor.
Definition graphVisitor.hpp:15
Signal handler zone management.
Definition sigZone.hpp:13
Definition tnarr.hpp:9
to Top