Skip to main content
0 votes
0 answers
52 views

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 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

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

UI code: try { authService.signInWithEmailAndPassword( emailController.text, passwordController.text); } catch (error) { print("ui rethrow"); } Auth service code: Future<...
2 votes
0 answers
202 views

(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

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

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

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

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

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

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 ...