Posted 16 April 2018 - 11:41 PM
This is the master version of the code, it works but is not the easiest for a human to read and understand: https://github.com/C.../checkpoint.lua
To understand this code you may want to check it's test file which is unchanged over all three versions: https://github.com/C...72a7f7/test.lua
The issue I'm having is in my rewites for the intentional error detection. I have two rewrites which both approch the problem from different directions which has resulted in both having very different bugs.
This version uses two corotines (via the parallel API) to run the callbacks while listening for terminate events (assuming that a terminate is the only type of intended error which doesn't cover every case).
The bug is that the program doesn't error on the terminate, in fact it doesn't seem to notice the event at all and just continues as normal.
https://github.com/C...kpoint.lua#L183
So I began another rewrite, this time by modifying the trace back part so that it sets a flag depending on if it decided to perform a stack trace or not (it seems to have working intentional error systems, the plan here was to piggy back on that). The bug here is that it doesn't work, every error is registered as unintended which means that the terminate gives unwanted error information.
https://github.com/C.../checkpoint.lua
To understand this code you may want to check it's test file which is unchanged over all three versions: https://github.com/C...72a7f7/test.lua
The issue I'm having is in my rewites for the intentional error detection. I have two rewrites which both approch the problem from different directions which has resulted in both having very different bugs.
This version uses two corotines (via the parallel API) to run the callbacks while listening for terminate events (assuming that a terminate is the only type of intended error which doesn't cover every case).
The bug is that the program doesn't error on the terminate, in fact it doesn't seem to notice the event at all and just continues as normal.
https://github.com/C...kpoint.lua#L183
So I began another rewrite, this time by modifying the trace back part so that it sets a flag depending on if it decided to perform a stack trace or not (it seems to have working intentional error systems, the plan here was to piggy back on that). The bug here is that it doesn't work, every error is registered as unintended which means that the terminate gives unwanted error information.
https://github.com/C.../checkpoint.lua
Edited on 19 April 2018 - 12:27 PM