All Questions

322
votes
12answers
419326 views

What is a StackOverflowError?

What is a StackOverflowError, what causes it, and how should I deal with them?
72
votes
5answers
19061 views

VS2010 does not show unhandled exception message in a WinForms Application on a 64-bit version of Windows

When I create a new project, I get a strange behavior for unhandled exceptions. This is how I can reproduce the problem: 1) create a new Windows Forms Application (C#, .NET Framework 4, VS2010) 2) a...
756
votes
6answers
224072 views

Why is it bad style to `rescue Exception => e` in Ruby?

Ryan Davis’s Ruby QuickRef says (without explanation): Don’t rescue Exception. EVER. or I will stab you. Why not? What’s the right thing to do?
17
votes
2answers
7194 views

Can't get ArrayIndexOutOfBoundsException from Future<?> and SwingWorker if thread starts Executor

I play with multitreading for SwingWorker by using Executor, and I'm there by mistake identified wrong elements from the Vector, looks like as this code pretty ignores that element in Vector doesn't e...
232
votes
15answers
79214 views

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 this bad? Sometimes I just don't care what the errors, are and I want to just continue w...
378
votes
16answers
55873 views

How slow are Java exceptions?

Question: Is exception handling in Java actually slow? Conventional wisdom, as well as a lot of Google results, says that exceptional logic shouldn't be used for normal program flow in Java. Two re...
312
votes
9answers
136306 views

Is there a difference between "throw" and "throw ex"?

There are some posts that asks what the difference between those two are already. (why do I have to even mention this...) But my question is different in a way that I am calling "throw ex" in another...
249
votes
11answers
174561 views

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 Exception object's InnerException and stack trace are preserved. Is there a differen...
615
votes
10answers
301129 views

Node.js Best Practice Exception Handling

I just started trying out node.js a few days ago. I've realized that the Node is terminated whenever I have an unhandled exception in my program. This is different than the normal server container tha...
553
votes
10answers
834265 views

Try/Except in Python: How do you properly ignore Exceptions?

When you just want to do a try-except without handling the exception, how do you do it in Python? Is the following the right way to do it? try: shutil.rmtree(path) except: pass

Previous Next