Top "Exception" questions

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

java.rmi.ConnectException: Connection refused to host: 127.0.1.1;

java.rmi.ConnectException: Connection refused to host: 127.0.1.1; nested exception is: java.net.ConnectException: Connection refused at sun.rmi.transport.tcp.…

java exception connection rmi remoteobject
When should an IllegalArgumentException be thrown?

I'm worried that this is a runtime exception so it should probably be used sparingly. Standard use case: void setPercentage(…

java exception illegalargumentexception
How to deserialize a JObject to .NET object

I happily use the Newtonsoft JSON library. For example, I would create a JObject from a .NET object, in this …

.net json exception serialization json.net
Troubleshooting BadImageFormatException

I have a Windows service written in C# using Visual Studio 2010 and targeting the full .NET Framework 4. When I run …

c# .net exception
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
What is a good way to handle exceptions when trying to read a file in python?

I want to read a .csv file in python. I don't know if the file exists. My current solution is …

python python-2.7 exception file-io
How to fix "'System.AggregateException' occurred in mscorlib.dll"

I'm receiving an unhandled exception while debugging, and the program stops executing. The debugger doesn't show me the line so …

c# .net exception aggregateexception
Why is "except: pass" a bad programming practice?

I often see comments on other Stack Overflow questions about how the use of except: pass is discouraged. Why is …

python exception error-handling try-catch
What to do on TransactionTooLargeException

I got a TransactionTooLargeException. Not reproducible. In the docs it says The Binder transaction failed because it was too large. …

android exception
Collection was modified; enumeration operation may not execute in ArrayList

I'm trying to remove an item from an ArrayList and I get this Exception: Collection was modified; enumeration operation may …

c# exception collections enumeration