Top "Exception-handling" questions

An exception is an unusual condition that requires deviation from the program's normal flow.

How do you implement a re-try-catch?

Try-catch is meant to help in the exception handling. This means somehow that it will help our system to be …

java exception exception-handling try-catch
Good way to encapsulate Integer.parseInt()

I have a project in which we often use Integer.parseInt() to convert a String to an int. When something …

java exception-handling encapsulation
Why is "throws Exception" necessary when calling a function?

class throwseg1 { void show() throws Exception { throw new Exception("my.own.Exception"); } void show2() throws Exception // Why throws is necessary …

java exception-handling unhandled-exception throws checked-exceptions
What is the proper way to re-throw an exception in C#?

I have a question for you that stems from my partner doing things a different way than I do. Is …

c# .net exception-handling
Spring Resttemplate exception handling

Below is the code snippet; basically, I am trying to propagate the exception when the error code is anything other …

spring rest exception-handling resttemplate
Best practices for catching and re-throwing .NET exceptions

What are the best practices to consider when catching exceptions and re-throwing them? I want to make sure that the …

c# .net exception-handling rethrow
Catch a thread's exception in the caller thread in Python

I'm very new to Python and multithreaded programming in general. Basically, I have a script that will copy files to …

python multithreading exception-handling exception
Handling InterruptedException in Java

What is the difference between the following ways of handling InterruptedException? What is the best way to do it? try{ //... } …

java multithreading exception-handling interrupted-exception
Catching multiple exception types in one catch block

I'd like a cleaner way to obtain the following functionality, to catch AError and BError in one block: try { /* something */ } …

php exception-handling
This could be due to the service endpoint binding not using the HTTP protocol

I have a WCF Service running fine on my local machine. I put it on the servers, and I am …

wcf exception-handling wcf-binding net.tcp wcf-endpoint