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
fix #23416 instantiate exceptions at right time #23417
Conversation
Can one of the repo owners verify this patch? |
OK TO TEST |
Test PASSed. |
I think this was intentional, since the stacktrace won't help you as much as you'd think it would... |
I'm having this being thrown and am trying to debug what is going on, since the cause might be in the implementation of the reading/writing done by a different lib the stack trace would be more than welcome. Currently the trace points to the location where .run() is called which is very confusing.
where the line in my code is this val is = source.toMat(StreamConverters.asInputStream(5.seconds))(Keep.right).run()
// the reading of the InputStream is handled further down in the code using a Future The error is probably caused by the library I am using that writes to the stream and closes/flushes multiple times. Also this is the only place in Akka streams where I see this pattern of pre-creating the exception. Sure this is not an accidental mistake? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think the stack trace will be useful, but I also think caching the exception was a premature optimisation, so LGTM
added some more proof of the usefulness of this patch in the ticket: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
fix #23416 instantiate exceptions at right time