exception (6,441)


c# Unhandled Exception Handler in.NET 1.1

c# Unhandled Exception Handler in.NET 1.1

I'm maintaining a.NET 1.1 application, and one of the things I've been tasked with is making sure the user doesn't see any unfriendly error notifications. I've added handlers to Application.ThreadEx…


c++ Ensuring that Exceptions are always сaught

Exceptions in C++ don't need to be caught(no compile time errors) by the calling function. So it's up to developer's judgment whether to catch them using try/catch(unlike in Java). Is there a way o…


c# How to check for file lock?

This question already has an answer here: Is there a way to check if a file is in use? 16 answers Is there any way to check whether a file is locked witho…


Reducing duplicate error handling code in C#?

I've never been completely happy with the way exception handling works, there's a lot exceptions and try/catch brings to the table(stack unwinding, etc.), but it seems to break a lot of the OO model…


Global Exception Handling for winforms control

When working on ASP.NET 1.1 projects I always used the Global.asax to catch all errors. I'm looking for a similar way to catch all exceptions in a Windows Forms user control, which ends up being a hos…


java IllegalArgumentException or NullPointerException for a null parameter?

I have a simple setter method for a property and null is not appropriate for this particular property. I have always been torn in this situation: should I throw an IllegalArgumentException, or a NullP…


java Why can't I use a try block around my super() call?

So, in Java, the first line of your constructor HAS to be a call to super... be it implicitly calling super(), or explicitly calling another constructor. What I want to know is, why can't I put a tr…


Repair SVN Checksum

I'm using subclipse in Flex Builder 3, and recently received this error when trying to commit: svn: Checksum mismatch for '/Users/redacted/Documents/Flex Builder 3/path/to/my/file.mxml'; expected: 'f8…


security Defensive programming

When writing code do you consciously program defensively to ensure high program quality and to avoid the possibility of your code being exploited maliciously, e.g. through buffer overflow exploits or…


.net Performance Considerations for throwing Exceptions

I have come across the following type of code many a times, and I wonder if this is a good practice(from Performance perspective) or not: try{...// some code}catch(Exception ex){...…





java handling error catch how example not throw exceptions try