All Questions

224
votes
6answers
165238 views

What does "fatal error: unexpectedly found nil while unwrapping an Optional value" mean?

My Swift program is crashing with EXC_BAD_INSTRUCTION and this error. What does it mean, and how do I fix it? fatal error: unexpectedly found nil while unwrapping an Optional value This post is ...
540
votes
19answers
245519 views

Java: checked vs unchecked exception explanation

I have read multiple posts on StackOverFlow about checked vs unchecked exceptions. I'm honestly still not quite sure how to use them properly. Joshua Bloch in "Effective Java" said that Use che...
22
votes
1answers
3339 views

Importing installed package from script raises "AttributeError: module has no attribute" or "ImportError: cannot import name"

I have a script named requests.py that imports the requests package. The script either can't access attributes from the package, or can't import them. Why isn't this working and how do I fix it? Th...
1153
votes
32answers
955518 views

Dealing with "java.lang.OutOfMemoryError: PermGen space" error

Recently I ran into this error in my web application: java.lang.OutOfMemoryError: PermGen space It's a typical Hibernate/JPA + IceFaces/JSF application running on Tomcat 6 and JDK 1.6. Apparentl...
155
votes
24answers
35491 views

Why not use exceptions as regular flow of control?

To avoid all standard-answers I could have Googled on, I will provide an example you all can attack at will. C# and Java (and too many others) have with plenty of types some of ‘overflow’ behavio...
128
votes
27answers
722845 views

How to solve java.lang.NoClassDefFoundError?

I've tried both the example in Oracle's Java Tutorials. They both compile fine, but at run-time, both come up with this error: Exception in thread "main" java.lang.NoClassDefFoundError: graphics/shap...
124
votes
12answers
242421 views

Official reasons for "Software caused connection abort: socket write error"

Given this stack trace snippet Caused by: java.net.SocketException: Software caused connection abort: socket write error  at java.net.SocketOutputStream.socketWrite0(Native Method) ...
169
votes
23answers
246842 views

Causes of getting a java.lang.VerifyError

I'm investigating the following java.lang.VerifyError java.lang.VerifyError: (class: be/post/ehr/wfm/application/serviceorganization/report/DisplayReportServlet, method: getMonthData signature: (IILj...
71
votes
2answers
26709 views

Deciphering the .NET clr20r3 exception parameters P1..P10

I'm trying to decipher the meaning on the P1...P10 parameters associated with a clr20r3 that is written to the event log when my application experiences an exception. The best I've been able to find ...
344
votes
33answers
116578 views

When to throw an exception?

I have exceptions created for every condition that my application does not expect. UserNameNotValidException, PasswordNotCorrectException etc. However I was told I should not create exceptions for t...

Previous Next