Double stacktrace with errorWithCallStack
Hello,
The documentation of https://hackage.haskell.org/package/base-4.10.0.0/docs/GHC-Stack.html#t:CallStack uses the following code:
errorWithCallStack :: HasCallStack => String -> a
errorWithCallStack msg = error (msg ++ "n" ++ prettyCallStack callStack)
But this is confusing because now you will get two stacktraces. One from error and one inside error with prettyCallStack.
Trac metadata
Trac field | Value |
---|---|
Version | 8.2.2 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Documentation |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |