[GHC] #8512: Add flag like '-xc' that only reports uncaught exceptions

#8512: Add flag like '-xc' that only reports uncaught exceptions ------------------------------------+------------------------------------- Reporter: blitzcode | Owner: simonmar Type: feature request | Status: new Priority: normal | Milestone: Component: Runtime System | Version: 7.6.3 Keywords: | Operating System: Unknown/Multiple Architecture: Unknown/Multiple | Type of failure: None/Unknown Difficulty: Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | ------------------------------------+------------------------------------- The -xc RTS flag reports the stack trace of all exceptions. This can be very noisy when, for instance, certain http or parsing libraries are used that throw many exceptions, often handled fully internal, during their normal operation. Having multiple threads makes it even noisier. I'd think having a flag like -xc that only reports uncaught exceptions would be useful. It seems the GHCi debugger has a flag to only stop on uncaught exceptions, maybe this could be made available as an RTS option? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8512 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8512: Add flag like '-xc' that only reports uncaught exceptions -------------------------------------+------------------------------------ Reporter: blitzcode | Owner: simonmar Type: feature request | Status: closed Priority: normal | Milestone: Component: Runtime System | Version: 7.6.3 Resolution: wontfix | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Changes (by simonmar): * status: new => closed * resolution: => wontfix Comment: The problem is that there are never any uncaught exceptions. All exceptions are caught at by something, even if it is only the outermost default exception handler that we install for all threads. Typically most exceptions will be caught and re-thrown multiple times by things like `bracket`. I agree it's noisy and undesirable, but I don't think there's anything we can do at the RTS level for `-xc`. However, there is ongoing work on stack traces which should eventually provide better facilities here. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8512#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8512: Add flag like '-xc' that only reports uncaught exceptions -------------------------------------+------------------------------------ Reporter: blitzcode | Owner: simonmar Type: feature request | Status: closed Priority: normal | Milestone: Component: Runtime System | Version: 7.6.3 Resolution: wontfix | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Changes (by Tarrasch): * cc: miffoljud@… (added) Comment: I'm looking closely at issues related to this for #3693. I believe that the way this will be solved is that you simply control from Haskell-land when a stack trace gets printed or not (from the handler). -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8512#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC