Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed WHILE-MEASURING macro for case when CATCH-ERRORS-P argument is given #7

Merged

Conversation

svetlyak40wt
Copy link
Contributor

Previously it didn't catched error and other outer handler was able to catch it.
For example in this situation WHILE-MEASURING will not return it's measurments:

CL-USER> (ignore-errors
           (lift:while-measuring (t :measure-seconds)
              (sleep 5)
              (error "Some shit happened")))
NIL
#<SIMPLE-ERROR 70B0125B13>

but I'd expect it to return:

NIL
(5.007D0)
#<SIMPLE-ERROR 70B0004B73>

This commit fixes the problem.

…given

Previously it didn't catched error and other outer handler was able to catch it.
For example in this situation WHILE-MEASURING will not return it's measurments:

    CL-USER> (ignore-errors
               (lift:while-measuring (t :measure-seconds)
                  (sleep 5)
                  (error "Some shit happened")))
    NIL
    #<SIMPLE-ERROR 70B0125B13>

but I'd expect it to return:

    NIL
    (5.007D0)
    #<SIMPLE-ERROR 70B0004B73>

This commit fixes the problem.
svetlyak40wt added a commit to svetlyak40wt/trivial-timeout that referenced this pull request Nov 23, 2021
This fixes issues of having signals from the body code signaled
in the incorrect thread.

Also, I've fixed usage of the LIFT:WHILE-MEASURING in tests.
From some moment it started to require a CATCH-ERROR-P argument.

Another error was fixed in the WHILE-MEASURING. It prevented it
from correct error catching. This pull-request should be merged
first:

hraban/lift#7
@gwkkwg gwkkwg merged commit e08e84e into hraban:master Nov 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants