exception

IllegalStateException: attempt to acquire a reference on a close SQLiteClosable

What may causes this exception? 10-26 07:06:08.214: ERROR/DatabaseUtils(10775): Writing exception to parcel 10-26 07:06:08.214: ERROR/DatabaseUtils(10775): java.lang.IllegalStateException: attempt to acquire a reference on a close SQLiteClosable 10-26 07:06:08.214: ERROR/DatabaseUtils(10775): at android.database.sqlite.SQLiteClosabl...

How to write this exception in Python 2.6

Hi, I need to write an expection that if a string is null, then fire this exception. How to write this? Eg. str = get_str() if get_str() returns None or nothing. It should raise an exception. ...

Error 80040154 (Class not registered exception) when initializing VCProjectEngineObject (Microsoft.VisualStudio.VCProjectEngine.dll)

Hello, I'm trying to run this tool in order to convert a Visual C++ project to makefile. The project I'm trying to convert project is written in VS2008, so I'm using a reference to Microsoft.VisualStudio.VCProjectEngine.dll from version 9. It fails in this line: VCProjectEngine vcprojEngine = new VCProjectEngineObject(); With the fo...

CHECKPOINT-FAIL com.thoughtworks.selenium.SeleniumException: this.waitForCondition is not a function

A simple function defined in the user-extensions.js : Selenium.prototype.doGetThis = function(){ var errors = ""; if (browserVersion.isChrome) { errors = true; } else { throw new SeleniumError("TODO: Non-FF browser..."); } return errors; } The Selenium.java file: String getThis() { return this....

Are .NET try / catch cheap?

Possible Duplicate: Performance Cost Of 'try' I stumbled upon this remark in "Best Practices for Handling Exceptions" at MSDN: " using exception handling is better because less code is executed in the normal case" in the context of whether one should check for the state of an object before calling a method or just call the m...

What circumstances should someone "try...catch"? Does this apply to libraries?

Suppose you're designing an application (WebApp, Desktop, anything) and you need to define exception handling for the code. Since you want to make things reusable, what logic should you follow when handling exceptions? Are there any patterns to follow? For example, if some DLL is going to use the network and the network is unreliable, ...

Why does .NET's StringValidator's Validate method throws an exception when it doesn't succeed?

As you can see in the MSDN StringValidator documentation, the Validate method returns void. If validation doesn't succeed the Validate method throws ArgumentException. I thought that "You only throw an exception when something exceptional happens". Surely a validator that failed to validate isn't exceptional.. Why not return bool? What a...

Exception Error when I try to initialize hudson.war

Hi there, I have installed hudson on Ubuntu server and then run java -jar hudson.war, giving me this exception error message: Status Code: 500 Exception: The error below occurred during context initialisation, so no further requests can be processed: java.lang.ExceptionInInitializerError at java.lang.Class.initiali...

[PHP] Initializing class with bad input makes it unusable but object is still existent

If I want to create a new object that needs certain informations like a product id or something like that but the input is bad how can I elegant manage such a case? class Product { function __construct($id) { if(is_invalid_id($id)) { return false; } } } If I initialize it this way I still get an object (since retur...

Getting more information when an Objective-C exception is raised due to assertion failure

I'm getting an assertion failure from a UIKit function in my iPhone app. The error message looks a bit like this: 2010-10-27 02:31:49.058 MyProgram[114:207] *** Assertion failure in <some random UIKit function>, <location in UIKit source code> The exact error isn't really important, but my problem is just that the message is a bit shor...

Borland c++ exception

i am using the Borland c++ 3.1 compiler. I want to work with exceptions, i've written the following code: void main (void) { int a = 0; int b = 1; int c; try { throw 1; } catch(int a) { b = a; } } The compiler returns a syntax error. what's wrong? ...

Only last line of the Exception stack trace shows up

Hi all, I am having some trouble collecting information on an unhandled exception being generated (very rarely) in my code. I have set up an the handler pretty much the standard way. In the main I have: AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(ExceptionProcessor); And the handler function is: ...

Add exception message to json response

Hello, I have a code which throws a specific type of exception like this: throw new BadDataException("error message"); these kind of exceptions are thrown inside a method whose response type is json. I have a configuration for this exception type like this: <global-exception-mappings> <exception-mapping result="badDataError" e...

(nsexception *ex)

Is there anything other than *ex for nsexception? The developer library doesn't even mention using *ex. I'm new to obj c, with php, I would just go to php.net to see examples on how to use classes . Is there a resource like that for obj c? The apple class reference is great, but if you haven't really done any coding in obj c it's ...

UnknownHostException when accessing api.twitter.com

Hi! I'm trying to access this list of public twitts here, from an android application through a HttpClient: http://api.twitter.com/1/statuses/public_timeline.json I keep getting an Exception when connecting: java.net.UnknownHostException: api.twitter.com Why is this happening? How can I fix this? Thank you ...

javax.servlet.jsp.JspException: Can't insert page ..... Software caused connection abort: socket write error

Hi, I just deployed an application to weblogic 10, and when I run my page, I get the custom error page with the following errror in the log. javax.servlet.jsp.JspException: Can't insert page '/pages/header.jsp' : Software caused connection abort: socket write error at org.apache.struts.tiles.taglib.InsertTag$InsertHandler.doEndTag(Ins...

Tomcat server exception - java:comp is not bound in this Context

In doing something else, I added a jar to my lib folder called catalina.jar . This allowed me to serve static content (which works), but my previously working struts actions (which access a database through hibernate) no longer work. The first indication of failure occurs on tomcat startup: SEVERE: Null component Catalina:type=DataSourc...

Testing for stack unwinding during statement execution

Is there a way in C# to test whether the execution of a statement happens during exception stack unwinding or not? Thanks, Marcello. Edit: I mean something like this: using (NewDbTransaction()) { //do some DB stuff here } <-- here Dispose() of IDisposable is called void DbTransactionWrapper.Dispose() { if (InException()) //is ...

Looking for a good C# exception logging tool

Hi, I got an exception in a program that I tested for someone. The program is written in Delphi and uses a nice exception logging tool named madExcept. It allows exception reporting of the user's system, a stack trace and so on. Is there a pendant for C#? ...

Exception: The specified Visual is not an ancestor of this Visual

The following method thrwos an exception in the line: Point childPosition = vb.TransformToAncestor(surfaceWindow).Transform(new Point(0, 0)); But if you look at the code, the vb is surely a child of surfaceWindow. So why isn't this working? if (!isExpanded()) { Viewbox vb = new Viewbox(); ...