exception

Uncaught exception in iPhone Obj C method causing crash. How to resolve / handle?

I have a crash, and I can't see why it's occurring. I'd like to get more info on it. The method that this is crashing in is: - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event when I execute this line of code during debug step through: [self.nextResponder manageTouches:touches]; this is displayed in the file history ...

What is causing this propel error?

I'm geting this error in propel when I run my app: PropelException: Unable to open PDO connection [wrapped: SQLSTATE[HY000] [14] unable to open database file] I've tried everything I can think of but can't figure out what is causing the problem. my build.properties is: propel.project = LinkCannon2 # The Propel driver to use for ge...

My application crashes with a FileNotFoundException, and I don't understand why

Errr... I have a text editor i made, which has been working perfectly for the past month without any problems. But today, and all of yesterday, everytime i open a txt file from explorer (doubleclicking it) instead of it opening in my editor, a message appears saying: Text Editor has encountered a problem and needs to close. We are sorry...

Hibernate: unmapped class association exception

I know this should be a pretty elementary issue to fix, but 1) I'm relatively new to Hibernate, and 2) the fixes I've found don't (seem to) apply here. Here is the exception I am getting: org.hibernate.MappingException: An association from the table POSTS refers to an unmapped class: com.beans.User at org.hibernate.cfg.Configuration...

Making Python's `assert` throw an exception that I choose

Can I make assert throw an exception that I choose instead of AssertionError? UPDATE: I'll explain my motivation: Up to now, I've had assertion-style tests that raised my own exceptions; For example, when you created a Node object with certain arguments, it would check if the arguments were good for creating a node, and if not it would...

BooleanQuery$TooManyClauses exception when using wildcard queries

I'm using Hibernate Search / Lucene to maintain a really simple index to find objects by name - no fancy stuff. My model classes all extend a class NamedModel which looks basically as follows: @MappedSuperclass public abstract class NamedModel { @Column(unique = true) @Field(store = Store.YES, index = Index.UN_TOKENIZED) pr...

How do you detect when the connection breaks when a web service is returning a result?

In a C# ASP .NET application I have a web service that receives a DataSet, processes it, and returns it. Returning it can take up to a minute over a slow connection. What happens in the background if that connection breaks after the last line of the web service method has run but while the data is still being sent? I tried wrapping my...

.NET Throwing Custom Exceptions

Can anyone shed some light on the pros and cons of throwing custom exceptions (which inherit from System.Exception), or the proper way to use them? I'm already aware of the when/when not to throw exception, but I am looking for guidance on how to create my own custom exceptions. ...

resizeTo in JS gives me "Access is denied" error, how to know if browser is ready?

Hi All, I have a web app, whose UI is written in GWT, where for various reasons I need to resize the active window when the server reports things. To do this I use a JSNI function which uses resizeTo and everything works great. I did a small test and tried sending a few updates from the server and got an "Access is denied" error from the...

How to find an ignored exception

Probably staying late fixing a few bugs tonight, but maybe SO can help me out. Does anyone know if there's a way to 'track' where some ignored exceptions are occurring? Basically I'm finding some System.OverflowExceptions in System.Drawing which are causing some graphics to not get painted (red X box syndrome). Problem is, I can only ...

XStream, CircularReferenceException

Please consider this code. Is it using Circular Reference? If not why am I getting CircularReferenceException, while enabling NO_REFERENCE mode in XStream. Anyone, please clarify the thing. @XStreamAlias("BalanceEnquiry") public class BalanceEnquiry extends EAIRequest { @XStreamImplicit private List<BalanceEnquiry.Detail> detai...

what's the catch (select new in LINQ vs simply filling the object)

Hello everybody, can someone please explain the difference between these 2 pieces of code: var temp = (from c in Context.SomeTable select new SomeObject { name=c.Name, created = c.Created}).ToList(); and this : var temp = (from c in Context.SomeTable select c); foreach(SomeTable t in temp) { SomeObject so = new SomeObjec...

Workflow and exception handling

In developing a custom workflow that will execute numerous work items, it is possible that one or more workitems could fail at any time during their routines and even perhaps raise exceptions. What is best practice when it comes to handling exceptions raised by workitems inside a workflow manager? For instance, should the workflow mana...

How to get a list of all possible exceptions that could happen within a specific scope

I've a class class_A dealing with another class class_B which has methods with calls to other objects dealing with HTTP and JSON. Now I don't wanna handle these exceptions within class_B but rather on a higher level and thus forward them via throw e to class_A. Now I'm wondering when in my class A surrounding the call to a method of cla...

Designing a class with **Exceptions**

When I design a class I often have trouble deciding if I should throw an exception or have 2 func with the 2nd returning an err value. In the case of 2 functions how should I name the exception and non exception method? For example if I wrote a class that decompresses a stream and the stream had errors or incomplete I would throw an exc...

Qt and error handling strategy

Actually, I do understand major pros and cons of using exceptions. And I use them in my projects by default as error-handling strategy. But now I'm starting a Windows CE project with Qt library, and I see that Qt creators refused to use exceptions in the class hierarchy. So, if I use exceptions I will need to carefully translate them to...

Where should I check state / throw exception?

My situation is something like this: class AbstractClass: def __init__(self, property_a): self.property_a = property_a @property def some_value(self): """Code here uses property_a but not property_b to determine some_value""" @property def property_a(self): return self.property_a @prope...

Catching "Stack Overflow" exceptions in recursive C++ functions

Is it possible to catch a stack overflow exception in a recursive C++ function? If so, how? so what will happen in this case void doWork() { try() { doWork(); } catch( ... ) { doWork(); } } I am not looking for an answer to specific OS. Just in general ...

Hibernate Annotations generating query that produces SQLGrammarException

Still duking it out with Hibernate... I'm using Hibernate-Annotations instead of hbm.xml files for my beans, but I'm currently running into a problem where the SQL that Hibernate is generating references nonexistent database columns. For instance, here is the code: Query q = session.createQuery("FROM Status ORDER BY post_date DESC"); ...

Eclipse cannot find java file generated via jsp on the work folder

I am currently programming using Eclipse 3.4.1 and using the Apache 5.5 as backend server. I am also using the com.sysdeo.eclipse.tomcat_3.2.1 plugin for tomcat. I was just wondering, when I encounter an error and prints the stack trace for the exception. I always would see the line code where the error occured on the java work file gen...