-
-
Notifications
You must be signed in to change notification settings - Fork 172
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
Printing a stack trace should show details for the "cause" Exceptions too #317
Comments
@peterlindstrom123 Hi there! Could you please try provide a minimum reproducible example? With the default config in (timbre/error (ex-info "Ex.1" {} (ex-info "Ex.2" {} (ex-info "Ex.3" {}))) "Foo") ; =>
Thanks! |
Hi, I'm not sure what you mean. Is all of this output related to nrepl.middleware.interruptible-eval/evaluate/fn interruptible_eval.clj: 91
clojure.core/eval core.clj: 3214
...
taoensso.timbre/eval14635 REPL Input
taoensso.timbre/-log! timbre.clj: 358
clojure.core/deref core.clj: 2320
...
taoensso.timbre/eval14635/fn REPL Input ? If that's correct, then as far as I can tell, my problem was that no source files or line numbers are mentioned for Obviously the details for all of the source exceptions are relevant? |
Yeah, hiding the chain of traces is a big mistake. I believe https://github.com/AvisoNovate/pretty is the culprit really. To deal with this I had to create my own |
Just to follow-up on this- I'm still not completely clear on what's being requested here. It'd be helpful to have the following:
Thanks! |
Of course this is pointless here in this example, but in other cases the exception and the cause traces are both actually needed. Compare:
i.e. both traces vs.
..which has only one of the traces. |
@lnostdal Hi Lars, thanks for the clear example! Apologies for the delay replying. A couple possibilities:
How does (2) sound? Would also be open to ideas re: alternative Cheers :-) |
Hi there! I'm doing something similar to nr. 1 now - but nr. 2 seems like a better idea. I don't know about alternatives to the pretty printing done by aviso, but this stacktrace stuff was so important to me I wanted all the details and even noise no matter what - so I just ended up doing: |
Great, thanks for the feedback @lnostdal. @lnostdal @peterlindstrom123 An |
This makes it easier to provide an alternative stacktrace implementation, etc.
This makes it easier to provide an alternative stacktrace implementation, etc.
This makes it easier to provide an alternative stacktrace implementation, etc.
This makes it easier to provide an alternative stacktrace implementation, etc.
This makes it easier to provide an alternative stacktrace implementation, etc.
The following neatly formatted stack trace printed by Timbre shows no trace of my own code, which makes it useless for figuring out where an error is happening.
But when I call a normal Java
.printStackTrace
, I see my own code in the details for one of thejava.net.http.HttpConnectTimeoutException
sThe text was updated successfully, but these errors were encountered: