[GHC] #12096: Attach stacktrace information to SomeException
GHC
ghc-devs at haskell.org
Mon Mar 6 23:15:11 UTC 2017
#12096: Attach stacktrace information to SomeException
-------------------------------------+-------------------------------------
Reporter: ndtimofeev | Owner: (none)
Type: feature request | Status: new
Priority: normal | Milestone:
Component: Core Libraries | Version: 8.0.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by ezyang):
So, in my head, I want to minimize the amount of changes to code necessary
to take advantage of call stacks. Adding CallStacks to each of the
exception types individually means that you have to modify each exception
type to contain a CallStack (so, linear in the number of exception types.)
Creating a new `SomeExceptionWithCallStack` means that we have to modify
all occurrences of catch-rethrow to preserve call stacks (so, linear in
the number of catch-rethrows in code everywhere.)
I admit that there is a tradeoff here, but the benefits of
`SomeExceptionWithCallStack` don't make sense to me. I imagine there are a
lot more catch-rethrows than there are exception types, and you will have
to go through and fix each one of them. Admittedly, if you get a call
stack that is missing info you need, it shouldn't be hard to track down
(since the error will have the call stack of the bad rethrow attached :)
Perhaps I am not seeing some other hidden costs?
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12096#comment:8>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list