wanted: easy way to capture backtraces when unwinding from conditions

Bug #1002381 reported by Nikodemus Siivola
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
SBCL
Triaged
Wishlist
Unassigned

Bug Description

HANDLER-CASE is more idiomatic, easier to use -- and often less troublesome than HANDLER-BIND for basic condition handling.

Esp.

  (handler-case (with-mutex (m) (foo))
    (error (e) (error e))

is an important modern idiom: don't want to hold on to the lock while handling the error. It however means that actual error context is lost.

I'm thinking we could have CONDITION-BACKTRACE, which HANDLER-CASE could automatically fill before unwinding if SB-EXT:*HANDER-CASE-BACKTRACES* (or another similar toggle) is true. Those backtraces need to be purged of all stack allocated objects, and other potentially bogus things, though. Possibly just printed frames?

This would be especially convenient for reporting errors from threads.

(Can you tell I've been living inside the JVM recently? Not being able to handle conditions without unwinding sucks, but exceptions carrying their backtraces with them is pretty nice.)

Tags: feature
Changed in sbcl:
importance: Undecided → Wishlist
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.