exception

Get a MYSQL Date into a c# String exception

Hi. I'm trying to extract a date field from a mysql db using .NET and MySQL .NET Connector. Whithin the test everything works great except the date, I mean, I can get the varchar fields but the DATE field (called R_DATE) is impossible. My SQL Query is: SELECT * FROM TABLE And, the way I'm trying to read it is: DateTime date = reade...

Why do I constantly get ActivityNotFound exceptions?

I'm a novice Android programmer, and to help me understand how Intents really work, I wanted to put together a small Activity which would let the user call startActivity() with any action and data they want. I tried many different combinations, including "android.intent.action.VIEW" and "http://www.google.com". No matter what combinati...

Grails - Exception when stopping/cancelling an upload

I have a very basic upload action in my controller. It looks something like the action below. It works great. The only problem I'm seeing is when a user cancels an upload (or hits stop on their browser). I am able to recover correctly, but not before seeing an uncaught exception in my logs. The exception is listed below. Any help o...

Is there a safe way to use setjmp() and longjmp() in C++?

I was under the impression that using setjmp() and longjmp() in C++ was almost guaranteed to mess up the stack, since these functions don't perform unwinding like, say, exceptions do. This MSDN page, however, indicates that the Microsoft implementation can be told to invoke the destructors of local objects, which implies that careful use...

Java Heap Memory error

hi I am getting this error: Exception in thread "main" java.lang.OutOfMemoryError: Java heap space at com.mysql.jdbc.MysqlIO.nextRowFast(MysqlIO.java:1585) at com.mysql.jdbc.MysqlIO.nextRow(MysqlIO.java:1409) at com.mysql.jdbc.MysqlIO.readSingleRowSet(MysqlIO.java:2886) at com.mysql.jdbc.MysqlIO.getResultSet(MysqlIO.jav...

ANTLR: MismatchedTokenException with similar literals

I have the following rule : A B; A : 'a_e' | 'a'; B : '_b'; Input: a_b //dont work a_e_b //works Why is the lexer having trouble matching this? When ANTLR matches the 'a_' in 'a_b' shouldnt it backtrack or use lookahead or something to see it cant match a token A and then decide to match token A as 'a' and then procede to matc...

Does the number of caught exceptions affect the performance of the try-code?

Hi. I've read pretty often, that using try-catch is quite slow compared to normal code. Now I wonder if the number of caught exceptions affects the performance of the code or not. So is try{ ... } catch(StrangeException e){ ... } slower than try{ ... } catch(StrangeException e){ ... } catch(MysteriousException e){ ... } c...

how asp.net gets surrounding code on error

Does anybody know how ASP.NET loads code snippet (i.e. the code you write including comments) on exception and displays it to user. It is the error screen with code snippet in yellow where the line where the occurs is highlighted in red. ...

Stopping a recursive generator & permutations

As an exercise, I've been trying out various ways of generating all permutations of a list in Python -- recursive, non-recursive... -- and comparing the performance with itertools.permutations(). But I'm having trouble with the generator version of the recursive method, which doesn't finish cleanly with a StopIteration exception, but ins...

Why doesn't this page redirect work in IE?

I check for a session variable in my asp.net page and redirect to my default page. if (Session["OrgId"] != null) { // some logic } else { Response.Redirect("../Default.aspx?Sid=1", false); } and in my default.aspx page i ve done this, Int64 id = GetId(Request.RawUrl.ToString()); if (id == 1) { ...

twisted: Failure vs. Error

When should I use a twisted.python.failure.Failure, and when should I use something like twisted.internet.error.ConnectionDone? Or should I do twisted.python.failure.Failure(twisted.internet.error.ConnectionDone), and if so, in what casese should I do that? ...

Breakpoint at exception in Eclipse - how to examine Exception object?

I feel like I'm missing something very simple here. I have Eclipse set up to break on all exceptions. So, let's say that it breaks on an AssertationFailedException. The Debug window will show that thread suspended and has the following data: Thread [Thread-1] (Suspended (exception AssertionFailedException)) ContactManager.addCon...

cgal python exception

from CGAL.Kernel import * raises an exception as follows: File "C:/Python26/Lib/site-packages/cgal\CGAL\__init__.py", line 1, in <module> from Kernel import * ImportError: No module named Kernel What could the reasons be? thanks ...

Hibernate, c3p0, and Mysql: the java.io.EOFException

Hello, I'm using Hibernate with MySQL and c3p0, and when the MySQL connection expires after 8 hours (wait_timeout), Hibernate is unable to reconnect and i get the following exception: com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception: ** BEGIN NESTED EXCEPTION ** java.io.EOFException ST...

try-catch-finally throwing exception in Java problem

I'm Java beginner, but I thought that when using try-catch-finally I don't have to declare the exception using throws SQLException. However if I don't use it the compiler gives me the error: "unreported exception java.sql.SQLException; must be caught or declare to be thrown". I included a catch so I'm not sure why this errors occurs. pu...

Is it correct to catch each exception with Exception class ??? If not then what?

Is it correct to catch each exception with Exception class ??? If not then what should be the correct sequence to catch exception within try catch block? e.g try{ . . some code . } catch(Exception ex) { throw ex; } ...

BeanCreationException NoSuchBeanDefinitionException while starting Google App Server for below Spring code

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'testController': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No matching bean of type [clinic.ict.service.TestService] found for dependency: expected at least 1 bean w...

Python urllib2 URLError http status code.

Hello, I want to grab the http status code once it raises a URLError exception: I tried this but didn't help: except URLError, e: logger.warning( 'It seems like the server is down. Code:' + str(e.code) ) ...

Incorrect Date Exception

I am trying to enter a date with with year 1900 using java into sql bt i am getting exception as : 'com.mysql.jdbc.MysqlDataTruncation: Data truncation: Incorrect datetime value: '1900-01-01 00:00:00' ' ...

What I have to do to solve "java.lang.IllegalArgumentException"?

Hello Friends, I am trying to process the following URL via the HttpGet method: https://graph.facebook.com/search?q=Cafe++Bakery&amp;type=event&amp;access_token=&amp;type=event&amp;access_token=239090718395|lqqOnRWlcJOb3QGp3G4HW2aqhlc. And I get the following exception: java.lang.IllegalArgumentException: Invalid uri 'https://gr...