| | |
| | | namespace kj { |
| | | |
| | | class ExceptionImpl; |
| | | template <typename T> class Function; |
| | | |
| | | class Exception { |
| | | // Exception thrown in case of fatal errors. |
| | |
| | | virtual StackTraceMode stackTraceMode(); |
| | | // Returns the current preferred stack trace mode. |
| | | |
| | | virtual Function<void(Function<void()>)> getThreadInitializer(); |
| | | // Called just before a new thread is spawned using kj::Thread. Returns a function which should |
| | | // be invoked inside the new thread to initialize the thread's ExceptionCallback. The initializer |
| | | // function itself receives, as its parameter, the thread's main function, which it must call. |
| | | |
| | | protected: |
| | | ExceptionCallback& next; |
| | | |
| | |
| | | |
| | | class RootExceptionCallback; |
| | | friend ExceptionCallback& getExceptionCallback(); |
| | | |
| | | friend class Thread; |
| | | }; |
| | | |
| | | ExceptionCallback& getExceptionCallback(); |