exception

GWT Javascript Exception in Hosted Mode: Result of expression 'doc.getBoxObjectFor' [undefined] is not a function.

Anyone ever seen this exception? I'm running in hosted mode on GWT 1.6.4 on a mac. I'm using the AutoSuggest and it's throwing this exception trying to show the popup. It works fine in compiled mode, but obviously hosted mode is rather important. [ERROR] Uncaught exception escaped com.google.gwt.core.client.JavaScriptException: (TypeErr...

What is the right way to do error handling in PowerShell?

PowerShell is a weird mix of .bat and .NET. In .bat, you check errorlevel and stderr output from commands. In .NET, you catch exceptions. How do cmdlets return errors? Do they throw exceptions when they fail or do they set $? instead? Is this configurable? I also assume that .NET functions I call in PowerShell will always throw excepti...

Unhandled Exception checker plugin for Visual Studio

I would like to be able, at compile time, to ask any given method what possible Exceptions might get thrown by invoking it. The list of Exceptions should include any uncaught Exception that might get thrown in any nested method invokation. Caught Exceptions should not be included in the list as I'm only interested in the Exceptions that ...

java servlet:response.sendRedirect() not giving illegal state exception if called after commit of response.why?

after commit of response as here redirect statement should give exception but it is not doing so if this redirect statemnet is in if block.but it does give exception in case it is out of if block.i have shown same statement(with marked stars ) at two places below.can u please tell me reason for it. protected void doPost(HttpServletR...

Do I have to worry about InterruptedExceptions if I don't interrupt anything myself?

I'm using java.util.concurrent.Semaphore in a hobby project. It's used in a connection pool class I'm writing. I can use it with little fuss, except for this method: public void acquire(int permits) throws InterruptedException which forces me to handle the InterruptedException. Now, I'm not sure what "interrupting" a Thread even me...

Throwing exception to client in GWT (Google Web Toolkit)

I'm using GWT (currenly working with google's eclipse plugin), and I'm trying to throw an exception from the server to the client. My exception is something like class LoginException extends Exception implements IsSerializable But I get (upon loading in hosted mode): [ERROR] Errors in '[...]/src/myPackage/client/services/Sess...

Why is my UDPClient null once in a while

Can someone explain to me why this code fails once in a while with a null exception for udpLink while sending? udpLink = new UdpClient(ipAddress, 514); using (udpLink) { udpLink.Send(rawMsg, rawMsg.Length); } This is the new code on how I fixed it. udpLink ...

Unhandled exceptions in field initializations

Does Java have any syntax for managing exceptions that might be thrown when declaring and initializing a class's member variable? public class MyClass { // Doesn't compile because constructor can throw IOException private static MyFileWriter x = new MyFileWriter("foo.txt"); ... } Or do such initializations always have to be mov...

Debugging with NUnit

I'm using NUnit for my unit tests and I have my unit test class library project setup so that Visual Studio launches the NUnit gui when I press F5. This lets me set breakpoints in my tests and look at the contents of variables, etc. What isn't happening though is that if one of my tests crashes (throws an exception) Visual Studio does ...

Calling a hook function every time an Exception is raised.

Let's say I want to be able to log to file every time any exception is raised, anywhere in my program. I don't want to modify any existing code. Of course, this could be generalized to being able to insert a hook every time an exception is raised. Would the following code be considered safe for doing such a thing? class MyException(E...

java.rmi.UnmarshalException: --- Cannot shutdown jboss

in trying to shutdown jboss it’s giving me an error and won’t shutdown. Any ideas what this means? /var/app/comcast/jboss-4.2.2.GA/bin/shutdown.sh -S Exception in thread "main" javax.naming.CommunicationException [Root exception is java.rmi.UnmarshalException: error unmarshalling return; nested exception is: java.io.EOFException...

C# Perform one last action on application crash

I'm not sure if there is a proper term for what I want to because any I've tried in google haven't bought anything up. Basically, on an application crash I would like to perform a final action to clean up database record locking. I would also like to catch this when debugging is stopped using the stop button, as I understand it using t...

Rails users: What exception notification software do you use?

I have seen Ryan Bates talk about exception_logger and exception notification. Are there any other good ones to consider? What do you like and dislike about these? Also, do these exception notifiers log exceptions if you catch them? Thanks! ...

Should my custom Exceptions Inherit an exception that is similar to them or just inherit from Exception?

I am creating some custom exceptions in my application. If I have an exception that gets thrown after testing the state of an argument, Or I have an Exception that gets thrown after testing that an int is within the proper range, should my exceptions inherit ArgumentException and IndexOutOfRangeException or should they just inherit Exce...

Why aren't exceptions in C++ checked by the compiler?

C++ provides a syntax for checked exceptions, for example: void G() throw(Exception); void f() throw(); However, the Visual C++ compiler doesn't check them; the throw flag is simply ignored. In my opinion, this renders the exception feature unusable. So my question is: is there a way to make the compiler check whether exceptions are c...

How to hide RuntimeException details from EJB client ?

I have a JEE5 application that exposes services using (local) session beans. When an internal fault occurs during service execution, a RuntimeException is thrown and encapsulated by JBoss(5.0.1) in a javax.ejb.EJBTransactionRolledbackException. The problem is that client applications receiving this EJBTransactionRolledbackException can...

VBA Error Handling

I am relatively new to VBA (Java/Python are more my thing, along with Haskell). One thing that has shocked and surprised me about VBA is the lack of any "obvious" way to do proper structured error handling. What are some good patterns for error handling in VBA? In particular, what should I do in this situation: ... some code ... ... s...

c++ exceptions, can what() be NULL?

Can a caught std::exception ever have what() being NULL? Is the checking for e.what() below overhead? //... } catch (const std::exception& e) { std::string error; if(e.what()) error = e.what(); } ...

Which .Net 2.0 Exception should I throw in this circumstance?

Hi there, I'm writing yet another ActiveRecord implementation for a company that is less scared of my code than they are the designation "Release Candidate" on CastleProject's implementation. Anyway, I'm using Attributes on each property in the base class to map them to the returning DataSet's columns: [ResultColumnAttribute("CUST_FIRS...

throwing exceptions of objects on the stack, mem leak with new?

Is it a bug to do this: if(some_error) throw Cat("Minoo"); Where Cat is a class. Then in some other function that called the method that threw the exception... I would have: catch(const Cat &c) { } If it is invalid, do I use new Cat("Minoo"); Would that cause a memory leak? ...