Showing posts with label error-handling. Show all posts
Showing posts with label error-handling. Show all posts

Monday, May 21, 2012

jQuery ajax (jsonp) ignores a timeout and doesn"t fire the error event


Hey fellow jQuery lovers,



To add some basic error handling, I wanted to rewrite a piece of code that used jQuery's $.getJSON to pull in some photo's from Flickr. The reason for doing this is that $.getJSON doesn't provide error handling or work with timeouts.

Wednesday, May 16, 2012

Error handling - is this a decent pattern?


I'm a naughty programmer, and until now I haven't handled errors properly (e.g. just catching a java.lang.Exception, printing a debug message, and moving on). When I do "handle" them, it's simply been to shut the compiler up.

Tuesday, May 15, 2012

When should I throw an exception as opposed to return an error in PHP?


I'm working on an API wrapper class, which is the first I've made. For the most part it hasn't been too difficult. Getting to the point where I need to deal with the potential of errors being returned by the API, however confused as to how I should go about dealing with them.

Tuesday, May 1, 2012

jQuery callbacks apparently repeat on failure?


I seem to be observing at least one case where a callback function passed to a jQuery effect function will execute repeatedly if there's an error while it's executing.

Tuesday, April 3, 2012

Try-catch exception handling practice for iPhone/Objective-C


Apologies if this question has already been answered somewhere else, but I could not find any decisive answer when searching on it:

Wednesday, February 8, 2012

iPhone - How to handle errors at runtime


When writing code, there are many situations that must be treated as runtime errors : an alloc/init returns nil, a resource is not found, a [someClass canDoThis] returns NO for an absolutely-needed feature where YES would be the natural answer, ...

iPhone - How to test allocated objects returned by each memory call?


When writing an app, you always have to write alloc/inits, get autoreleased datas returned by the framework classes, ...

Sunday, January 29, 2012

Distinguish new vs existing exceptions


I am creating a PHP application and I want to display the number of times an error has occurred. The problem that I am trying to figure out is if an error has already been reported or if its new using the following values: