exception

MalformedByteSequenceException while trying to pars XML

Hey guy, maybe someone can help: I have the following .gpx data from wikipedia: <?xml version="1.0" encoding="UTF-8" standalone="no" ?> <gpx xmlns="http://www.topografix.com/GPX/1/1" creator="byHand" version="1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.to...

Authentication Failed exception - In the middle of bulk mail sending code.

We have a thread program that sends bulk mail. The information like 1. To 2. Subject Etc. are fetched from database, mail is composed and pushed to SMTP server. One of our customer sent a bulk mail with 2390 email. After sending 40 emails, suddenly the following exception occurred EXCEPTION javax.mail.AuthenticationFailedException ...

Exception Specification.

Does Exception specification is a part of method signature? What I mean is: public void someMethod(String myString) throws IOException is 'throws IOException' a part of a signature of this method? Thanks ...

What else can cause 'Padding is invalid and cannot be removed" exception with WebResource.axd?

Recently, a couple of my applications have started throwing exceptions with the message Padding is invalid and cannot be removed intermitently My applications already have a machineKey specified in the web.config as suggested in this thread The applications are deployed to a single Windows 2003 server running IIS6. ...

Handling Errors in PHP

I have a custom class that, when called, will redirect to a page and send a 'message_type' and 'message' variable via GET. When the page opens it checks for these variables and displays a 'success', 'warning', or 'error' message depending on the 'message_type' variable. I made it so the user thinks they stay on the same page. It also all...

Handle .NET exceptions within Classic ASP pages

Hi All, I am making MSSQL stored procedure CLR calls from ASP pages. When an exception occurs, it is logged and then rethrown. In this scenario I need to be able to handle the exception (if possible) in the ASP page. Note that I cannot move away from classic ASP in this instance; I am stuck within a legacy system for this project. P...

Extracting user-friendly exception details in Java

I've got a J2EE web application that I'm working on and when an exception occurs, I'd like to get some basic details about the exception and log it. The message that I'm logging should be pretty basic, something that might mean something to the people running the web server(s). Would using e.getMessage() be the best thing to log? Than...

Is it bad to throw exceptions to return server errors, eg. 404 Page Not Found?

I am working on a PHP framework and am currently designing error handling. Based on what I have read on SO, I should only use exceptions for, well, exceptional situations. Therefore throwing an exception when an incorrect password is entered is wrong. Should I avoid using exceptions when I want to return a server error code to the user ...

How do I implement a fibonacci sequence in java using try/catch logic?

I know how to do it using simple recursion, but in order to complete this particular assignment I need to be able to accumulate on the stack and throw an exception that holds the answer in it. So far I have: public static int fibo(int index) { int sum = 0; try { fibo_aux(index, 1, 1); } catch (IntegerExcepti...

VB.NET SqlException Was Unhandled

I am trying some SQL code but I get an error when I try this code. Main.database.ExecuteCommand("UPDATE Contacts SET first_name='" + c.first_name + _ "', middle='" + c.middle + _ "', last_name='" + c.last_name + _ "', age='" + c.age + _ ...

python httplib httpexception error codes

Does httplib.HTTPException have error codes? If so how do I get at them from the exception instance? Any help is appreciated. ...

Writing catch block with cleanup operations in Java ...

I was not able to find any advice on catch blocks in Java that involve some cleanup operations which themselves could throw exceptions. The classic example is that of stream.close() which we usually call in the finally clause and if that throws an exception, we either ignore it by calling it in a try-catch block or declare it to be reth...

When is it appropriate to use error codes?

In languages that support exception objects (Java, C#), when is it appropriate to use error codes? Is the use of error codes ever appropriate in typical enterprise applications? Many well-known software systems employ error codes (and a corresponding error code reference). Some examples include operating systems (Windows), databases (Or...

Java can't find file when running through Eclipse

When I run a Java application that should be reading from a file in Eclipse, I get a java.io.FileNotFoundException, even though the file is in the correct directory. I can compile and run the application from the command line just fine; the problem only occurs in Eclipse, with more than one project and application. Is there a setting I...

How can i solve "Captcha required" error in Google Apps API Ver 2 for .NET ?

Hi, I am migrating Contacts to Google Apps. But after migrating around 300 contacts I am getting "Captcha Required" Exception at line : Uri feedUri = new Uri(ContactsQuery.CreateContactsUri(UserName)); ContactEntry createdEntry = (ContactEntry)service.Insert(feedUri, ContactEntry[0]); I am using Ver2 of Google API. How can i solve th...

Python: User-Defined Exception That Proves The Rule

Python documentations states: Exceptions should typically be derived from the Exception class, either directly or indirectly. the word 'typically' leaves me in an ambiguous state. consider the code: class good(Exception): pass class bad(object): pass Heaven = good() Hell = bad() >>> raise Heaven Traceback (most recent call last): ...

DataContext.CreateDatabase() says file already exists - but it doesn't

This might be a Windows 7 issue, but calling using (var context = new DataClassesDataContext()) { if (!context.DatabaseExists()) { context.CreateDatabase(); } } Results in the following error: System.Data.SqlClient.SqlException was unhandled Message=Database 'C:\Temp\SmallBusinessManager.mdf' already ex...

Java: Check what processes are bound to a port?

Hi, I am developing an application in Netbeans, and it is using JavaDB. I can connect to it and execute queries without issues, but for some reason, the "Output - JavaDB Database Process" pane within Netbeans keeps displaying Security manager installed using the Basic server security policy. Could not listen on port 1527 on host localh...

Win32 Thread Exits Unexpectedly

Hello, I'm writing a C++ application. I realized that one of my worker threads may terminate unexpectedly. The (VS 2005) debug log says: The thread 'Win32 Thread' (0x5d98) has exited with code -858993460 (0xcccccccc). I surrounded all the worker thread code with a try/catch block. So, if the reason was an exception, I would cat...

Edit details from xml using DOM in java : problem in storing it into file.

I am using following code for storing edited data As : DOMSource source = new DOMSource(doc); StreamResult result = new StreamResult(new FileOutputStream(outputURL)); TransformerFactory transFactory = TransformerFactory.newInstance(); Transformer transformer = transFactory.newTransformer(); transformer.transform(source, result); I am ...