11 questions with no answers
0
votes
0
answers
52
views
Java 8, Optional. throwing Exceptions, and Re-throwing exceptions, preventing null
I have confusing (lack of comprehension) trying to translate some part of my code to Optional on Java 8.
First example mock Code
private void privateMethodOne(CustomRequesDto customRequesDto) {
...
1
vote
0
answers
2k
views
Why if we return from finally, rethrow from catch not works?
Why first case prints :
"second level catch"
"top level catch"
and second case prints:
only "second level catch"?
Difference in finally block.
Future<void> main() ...
2
votes
0
answers
99
views
Any downsides to rethrowing the *cause* of a checked exception as an unchecked exception?
I am writing a library in which I use checked exceptions internally as it helps to make sure that all paths handle certain exceptional cases. However, I don't want to burden the users of my library ...
0
votes
0
answers
108
views
Try catch block doesn't catch rethrown error
UI code:
try {
authService.signInWithEmailAndPassword(
emailController.text, passwordController.text);
} catch (error) {
print("ui rethrow");
}
Auth service code:
Future<...
2
votes
0
answers
202
views
Groovy catch a parent Exception but NOT a children Exception
(context: integrating with an application -Jenkins- with various plugins not all with good design)
I have these exception:
public class AbortException extends IOException
and in some cases I want to ...
1
vote
0
answers
246
views
Rethrow original exception when catch clause has another try-catch which throws nothing - equivalent in Reactive pipeline
I have a method which would be like this in traditional, imperative try-catch coding style:
void confirmCart(Checkout Order) {
try {
cartService.confirm(order.getCartId(), order....
0
votes
0
answers
55
views
Passing Caught C# Exception as Parameter
Will Jon Skeet feed me to his pet unicorn if I do something like the following?
private void TakeTheRisk()
{
try
{
...
DoRiskyBusiness();
...
}
catch (...
1
vote
0
answers
161
views
init(_:uniquingKeysWith:) : Call can throw, but it is not marked with 'try' and the error is not handled
I have a doubt with rethrows. Following code is inside Dictionary extension:
init(_value: [(Key, Value)]) {
self.init(_value, uniquingKeysWith: { _, first in first }) //Call can throw, but it ...
1
vote
0
answers
39
views
Why does javax.tools.ToolProvider.getSystemTool(...) rethrow with the widest Error class instead of ServiceConfigurationError?
The method javax.tools.ToolProvider.getSystemTool(Class clazz, String moduleName, String className) has the following body (JDK 12):
private static <T> T getSystemTool(Class<T> clazz, ...
2
votes
0
answers
428
views
Stackoverflow while rethrowing exception due to ntdll!RcConsolidateFrame (x64)
I am struggling with a stack overflow exception, which occurrs while rethrowing a different exception. The rethrown exception is used to tear down the callstack after a recursive function has called ...
0
votes
0
answers
331
views
Should System.Exception " is not a valid value for T" when converting an empty String be an InvalidCastException?
I've encountered this a few times, and it seems very wrong to me that .NET operations should throw a System.Exception instead of something more specific. Is there a reason why one shouldn't rethrow ...