-
Notifications
You must be signed in to change notification settings - Fork 534
Clarify the definition of the term "return normally" #327
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
Comments
@anthonyvdotbe Your proposal would possibly be backwards incompatible. A backwards compatible alternative would be something along the lines of:
Thoughts @reactive-streams/contributors ? |
If I'd come across this definition, my train of thoughts would be something like:
And I'd still be puzzled about whether or not RuntimeExceptions that are not explicitly allowed, are considered "fatal errors" (or may be considered as such under certain conditions). Or even if all instances of java.lang.Error are considered "fatal", e.g. what about java.lang.NoClassDefFoundError? (Also there's the contrived case of using Class::newInstance, which might even cause checked exceptions to be thrown as well.) So personally I would prefer an unambiguous definition, even if it might introduce an incompatibility. At least you'd know for sure that the implementation is correct/incorrect, whereas now an implementation may be both correct and incorrect at the same time, depending on the definition of "fatal error". Just my 2 cents. |
How about: "Fatal error" means that a failure so severe has happened that the only sensible course of action is to crash the virtual machine process. |
I'd really like the specification to define "returns normally" in terms of specific class names. Given your definition of "fatal error", I also fail to see why:
would possibly be backward incompatible, while:
would not? |
@anthonyvdotbe Why class names? (Not all Errors are fatal, and not all fatal failures are java.lang.Errors.) |
@viktorklang because I'm wondering: who decides what a fatal error is and is not? In other words: if I write a Subscriber implementation, how can I be sure I'm implementing the spec correctly, and rule 2.13 will never be violated? Or is this actually a non-question and do I don't have to care about which unchecked exceptions my implementation may throw, since the spec clarifies what the caller must do if the rule is violated? Or should I have a |
@anthonyvdotbe There is no way to guarantee that rules will never be violated. :)
As for fatalities, it is about Throwables where the catcher deems them as being indicative of irrecoverable system failures, i.e. warranting a System.exit(nonzero). |
Ok, I think I get it. Actually, I'd just change the note to the following then:
and add a note to §2.13 saying something like:
@viktorklang what do you think? |
@anthonyvdotbe Doesn't have to ber something like:
? I like your footnote. |
@viktorklang I had simply replaced Bottom line: I believe this issue can be closed without change, and the addition of the note to §2.13 can be taken care of in #328 |
@anthonyvdotbe Deal :) |
The note says:
but "exceptions" is too vague here. In my opinion, this must be reworded to use specific class names. I've asked about this in the context of §2.13 and based on the replies I propose the following:
The text was updated successfully, but these errors were encountered: