exception

Can someone explain this JDBC Exception to me?

I'm gettting the following exception when performing an insert to an Oracle Databse using JDBC. java.sql.SQLRecoverableException: Io exception: Unexpected packet What could cause this and how can I recover from it? The application I'm writing performs an aweful lot of updates the the databse in rapid succession. Judging from the exce...

Is object oriented exception handling in Perl worth it?

I recently read "Object Oriented Exception Handling in Perl" Perl.com article. Is there any point to use exceptions in Perl? ...

Hashtable insert failed. Load factor too high. - ASP.NET 2.0

I received the following error while trying to login to a secured directory. As far as I know there are no large hashtables in use. The user login information is in the web.config file. Notice this is happening in .NET 2.0. I've searched and found references to this occurring in .net 1.0 or 1.1 environments but I haven't found a solution...

Using Condition in Regular Expressions

eg: Text: <!-- Nav bar --> <TD> <A HREF="/home"><IMG SRC="/images/home.gif"></A> <IMG SRC="/images/spacer.gif"> <A HREF="/search"><IMG SRC="/images/search.gif"></A> <IMG SRC="/images/spacer.gif"> <A HREF="/help"><IMG SRC="/images/help.gif"></A> </TD> Regex: (<[Aa]\s+[^>]+>\s*)?<[Ii][Mm][Gg]\s+[^>]+>(?(1)\s*</[Aa]>) Resul...

Debug.Assert vs Exceptions

Surprisingly I was only able to find one previous question on SO about this subject, and I'd just like to get the community "Vote of Confidence" (or not!) on my approach. The way I see it is thus: use Debug.Assert to state things you EXPECT would be true. This would be used when we are in complete control over our environment, for ex...

return eats exception

I found the following behavior at least weird: def errors(): try: ErrorErrorError finally: return 10 print errors() # prints: 10 # It should raise: NameError: name 'ErrorErrorError' is not defined The exception disappears when you use return inside a finally clause. Is that a bug? Is that documented anywhere? ...

How do I gracefully test for overflow situations in C#?

Update: I'm going to leave it as is: The performance hit of a exception (very rare) is better than the probably performance hit for checking on each operation (common) I'm trying to support an "EstimatedRowCount" that in one case would be the product of two sub-cursors that are joined together: estimatedRowCount = left.EstimatedRowCo...

Consequences of these Pointer Errors in C++ vs Managed

I'm making this a community wiki in order to better understand the semantic differences between these errors and their runtime or compiled consequences. Also, I've coded on Java far too long and I want to learn pointers better in C++ -- so I need other people to do it. Edit2: I am refactoring this question. The distinction I am trying...

How to print stack trace of an exception in a velocity template

How to print the complete stack trace of the exception using a velocity template My present template has $exception as template variable, which contains the exception. ...

How to display a standard SharePoint "Access Denied" message

How can I re-direct the user to the standard SharePoint "access denied" page, similar to the image below? Currently, I am throwing an UnauthorizedAccessException, but this error message is not as elegant as SP message. throw new UnauthorizedAccessException("User does not have permission to access this list"); Any help will be highly ...

Why don't you have to explicitly declare that you might throw some built in exceptions in Java?

I've noticed with Integer.parseInt() that you don't have to surround it with a try catch or declare that the method might throw an exception, despite the fact that it "throws" a NumberFormatException. Why don't I have to explicitly catch the NumberFormatException or state that my method throws it? ...

How to make sure you dont get WCF Faulted State Exception?

I am getting this exception "The communication object, System.ServiceModel.Channels.ServiceChannel, cannot be used for communication because it is in the Faulted state" The WCF service uses the default wsHttpBinding. I am using WCF in the following way wherever I am using it - using (var proxy = new CAGDashboardServiceClien...

WPF: How to handle errors with a BackgroundWorker

I am a bit of a newbie when it comes to windows client programming. I have a background worker that has a DoWork event and a RunCompleted event wired up. If an exception gets thrown in DoWork, I want to make changes to my UI, however, I cant because it is in a different thread. I can communicate the error to RunCompleted, but that doesn'...

Should a business rule violation throw an exception?

Should a business rule violation throw an exception? ...

Catching exceptions in Java

Hello, There are certain predefined exceptions in Java, which, if thrown, report that something serious has happened and you'd better improve your code, than catching them in a catch block (if I have understood it correctly). But still I find many programs in which I have the following: } catch (IOException e) { ... } catch (FileN...

common error page in ASP.NET

How to setup a common error page in ASP.NET website? Also how to handel the error in Data Access Layer by common error page? ...

How do i keep a caught exception from reporting as uncaught in a blackberry app?

Edit: this applies to simulators only, but i would still like to know if there is a resolution. I have some code in a blackberry application that catches an exception at some point, does some handling in the catch block then rethrows the exception, which is caught higher up on the call stack. However even though i do catch it later on,...

Catching c++ base exceptions

In my project we have a base exception. For handling showing error dialogs, log and such. Im looking for a way to handle all derived classes of that exception, I thought this would work: try { main_loop(); } catch (const MyExceptionBase* e) { handle_error(e); } As every child instance thrown could be represented by a pointer to it...

How to build a C++ Dll wrapper that catches all exceptions?

Like the title says, we’re looking for a way to catch all exceptions from a piece of C++ code, and wrap this in a dll. This way we can shield of the application that uses this dll, from any errors occurring in this dll. However, this does not seem possible with C++ under Windows. Example: void function() { try { ...

How do I intercept a NotImplementedException in a WPF application?

How do I intercept a NotImplementedException in a WPF application? I'll occasionally throw a NotImplementedException while testing my in-progress WPF application: Private Sub ButtonDoSomething_Click(...) Handles ButtonDoSomething.Click Throw New NotImplementedException( _ "ButtonDoSomething_Click() not implemented.") End Su...