-
Notifications
You must be signed in to change notification settings - Fork 255
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
'public static final' exceptions render stack trace useless #352
Comments
@miguelnmiranda It isn't really a consequence of using Rx but the validity/usefulness of stacktrace in an asynchronous application and (possibly premature) optimization of reducing the overhead of creating a stacktrace when it has limited meaning.
What other information are you looking for? |
@NiteshKant You are right, the meaning of a stack trace in an asynchronous application is very limited. What information is relevant really depends on the context. On my case it end up being a memory problem, or lack of it. But what bothered me at the time was that although the rest of the application I am working in is asynchronous it is structured in a different way where stack traces still makes some sense, and so when debugging your mindset is.. lets follow that! making us believe Yours is a tricky question. Having a mechanism that would allow to decide what you want to see when such an exceptional event occurs would be nice. That being said, what is relevant will vary, and throwing exceptions might make sense in cases where you have a considerable amount of logic inside an event manipulator. |
@miguelnmiranda I will change this instance of cached exception to be created on demand. I agree it is misleading, whenever caching exception (when required), the stacktraces should atleast be truncated so that it is not confusing. |
In ConnectionPoolImpl.java PoolExhaustedException is 'stored' as a static final field.
This means that the stack trace displayed when you throw the exception refers to when ConnectionPoolImpl was first instantiated and not to the actual occurrence of the exception.
Is this a consequence of using Rx? Is there a way of getting more info around the state of the system when the exception occurred?
The text was updated successfully, but these errors were encountered: