exception

What is a fault clause in the CLR exception system?

I was reading this article on handling corrupted state exceptions and I came across something that puzzled me. What is a fault clause? See quote from article below: An error condition can only pass from the function containing the unexpected condition to that function's caller. Exceptions have the power to pass the result...

C# Unable to find System.Exception error running at a customer site

I have a customer who is unable to run our program without it crashing and creating the error below in the Event log. As always it works just fine on our computers (tried 6+) but the customer is saying that as soon as the click on anything in the program they get the error below. EventType clr20r3, P1 datamonitor.exe, P2 1.0.0.3, P3 ...

Can an async I/O throw an uncatchable exception?

I have a multi threaded .NET app that uses async I/O and AsyncCallbacks to handle the I/O completions. Rarely, the app will fail with an exception like: Arithmetic operation resulted in an overflow. at MyApp.ReadComplete(IAsyncResult ar) in c:\MyApp.cs:line 123 at System.Net.LazyAsyncResult.Complete(IntPtr userToken) at System...

Visual Studio 2008 Exception Window replaced by a Pop-up Window

Greetings, I have this annoying problem where my exception window in Visual Studio 2008 is replaced by a Windows pop-up dialog box (see images below). The exception detail can be quite usefull, so any help would be appreciated. ...

How can I work around the __Canon type problem in generic exception handlers?

Given an extension method like this: Public Sub RehydrateTo(Of T As New)(ByVal input As String, ByRef output As T) Dim ms As MemoryStream = MsFromString(input) Dim f As New DataContractSerializer(GetType(T)) Try output = CType(f.ReadObject(ms), T) Catch ex As SerializationException output = New T Dim ild ...

How do I catch this exception in Swing?

I have a Swing application, and even though I have everything in a try/block, the exception isn't caught. public static void main(String[] args) { try { App app = new App(); app.setVisible(true); } catch (Throwable e) { System.err.println("never printed"); } } all I get is this stack trace: Exception in threa...

In what circumstances is @finally non-redundant in Cocoa's try/catch/finally Exception Handling?

Consider the following Cocoa/Obj-C code snippets: MyClass *obj; @try { [obj doSomething]; } @catch (NSException * e) { NSLog(@"Exception occurred: %@", [e description]); } @finally { [obj cleanUp]; } and MyClass *obj; @try { [obj doSomething]; } @catch (NSException * e) { NSLog(@"Exception occurred: %@", [e description]); } [obj...

C# - What is good SQLException Error Handling for Time-outs and failed connections

I use EntitySpaces for all of my Database related coding. As a sole developer I don't have time to sit and write the SQL for each and every application I write, so using a generator such as ES Suites me down to the ground and saves me days, if not weeks, of time. I generally write a series of helper classes for each of the tables that m...

MOSS 2007 site in a farm type initializer exception

We have some solution that we built against a MOSS farm one of which includes a timer job. This job has been working just fine for months. Recently the administrator enlisted another server into the farm, and our timer job automatically started running on this new machine. As soon as this switch happened our timer job started yielding th...

Enterprise Library 4.1 Exception policy

Hello, I am using Enterprise Library 4.1 and want to implement Exception handling and logging. I am able to setup one policy that handles general Exceptions of the System.Exception type. I call this policy 'Data Access Policy'. In a general application development rule, how many policies should I create? What are the best practices for...

Custom WCF IDispatchOperationSelector only works when debugger is NOT attached

I'm creating a custom IDispatchOperationSelector to support a Java client calling a WCF service - this Java client does not send the SoapAction header, so I need to select the operation based on the body of the message. Below is the custom SelectOperation method. It works just fine when the debugger is NOT attached - however, when it i...

Best alternative exception handling model

Sadly, I have a legacy PHP4 system that I continuously need to add features to. It doesn't look like there will be resources to do a port to PHP5 for several months if not several years. Over the course of the past few years, one of the major things that has bothered me is not having the ability to throw exceptions cleanly. Because of th...

How to get a stack for exception.

Hi guys I have a Winform application (C#) which imports some functions from dll. Sometimes when running the application i get the following exception: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. I catch it in AppDomain.CurrentDomain.UnhandledE...

Ruby: Unwanted context in exceptions raised within an eval

There seems to be an odd discrepancy between the messages contained in Ruby Exceptions raised directly and raised from within evals. For instance, the following code: def foo raise "Help!" end puts "\nRescue foo" begin foo rescue RuntimeError => e puts e.message end puts "\nRescue eval 'foo'" begin eval "foo" rescue RuntimeError =...

kodo/jdo/FatalInternalException ?

Hi, anyone has an idea why this error happens or where I can get the JAR file which contains this class? Caused by: java.lang.NoClassDefFoundError: kodo/jdo/FatalInternalException at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:164) at $Proxy0.<clinit>(Unknown Source) at s...

understanding WinDbg output

I have a Winform application (C#) which imports some functions from dll. Sometimes when running the application i get the following exception: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. I catch it in AppDomain.CurrentDomain.UnhandledExc...

Exception Driven Programming for PHP?

I saw Jeff Atwood's post on his blog about Exception Driven Programming and I was curious if there is anything like ELMAH for PHP? G-Man ...

Why does this code compile and run successfully it seems it should get an index out of bounds.

I was reading through some java code in a project I was working on and came along a method with something to this effect in it. Object[] objs = null; objs[0] = str1; objs[1] = obj1; for(String str: strArray) { objs[objs.length+1] = str; } I can't figure out what is going on here. I was hoping someone could explain how this code i...

Is there anything like ELMAH for Java?

Duplicate: Exception Driven Programming in Java I have been looking at ELMAH and was wondering what kinds of similar applications are available for Java. Thanks for the recommendations for log4j and other frameworks. Like the author of the post this question duplicates, I'm just looking to see if a more full-featured solution exists ...

SQL Server error handling: exceptions and the database-client contract

We’re a team of SQL Servers database developers. Our clients are a mixed bag of C#/ASP.NET, C# and Java web services, Java/Unix services and some Excel. Our client developers only use stored procedures that we provide and we expect that (where sensible, of course) they treat them like web service methods. Some our client developers don...