This repository was archived by the owner on Oct 12, 2022. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3514,6 +3514,8 @@ shared static this()
35143514
35153515private
35163516{
3517+ extern extern (C) __gshared bool rt_trapExceptions;
3518+
35173519 extern (C ) void fiber_entryPoint()
35183520 {
35193521 Fiber obj = Fiber .getThis();
@@ -3524,13 +3526,21 @@ private
35243526 obj.m_ctxt.tstack = obj.m_ctxt.bstack;
35253527 obj.m_state = Fiber .State.EXEC ;
35263528
3527- try
3529+
3530+ if (rt_trapExceptions)
35283531 {
3529- obj.run();
3532+ try
3533+ {
3534+ obj.run();
3535+ }
3536+ catch ( Throwable t )
3537+ {
3538+ obj.m_unhandled = t;
3539+ }
35303540 }
3531- catch ( Throwable t )
3541+ else
35323542 {
3533- obj.m_unhandled = t ;
3543+ obj.run() ;
35343544 }
35353545
35363546 static if ( __traits( compiles, ucontext_t ) )
You can’t perform that action at this time.
0 commit comments