CTryCatch icon indicating copy to clipboard operation
CTryCatch copied to clipboard

Support for `throw`ing inside catch block or nested try/catch structure

Open Jamesits opened this issue 9 years ago • 2 comments

Jamesits avatar Jan 03 '16 15:01 Jamesits

This can be solved by a global jmp_env stack.

Jamesits avatar Jan 03 '16 15:01 Jamesits

Steps:

  1. Setup a global stack in which stores jmp_envs and other useful information.
  2. push() before current try macro, and pop() after try statement has finished.

step 2 can be done by using a while since on finish it went back to evaluate its value again.

Jamesits avatar Jan 05 '16 14:01 Jamesits