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...
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.
...
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...
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....
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...
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, ...
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...
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...
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...
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...
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?
...
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:
...
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...
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 ...
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
...
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...
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...
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 ...
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#?
...
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();
...