Making my application crash more gracefully

I have an app that is running pretty stably (no more crashes actually), but as everybody knows your program crashes as soon as it gets in the hands of somebody else :D

What I would like is to find a(all) the place(s) where I can put a try{}catch(){} to be able catch and control what happens when the app crashes unexpectedly (display a better message, send log, possible recovery...)

I know its surely not that simple but still it would be good if there was a way to catch most of them.

(for example there is a small bug in GLSurfaceView that when it is being closed causes sometimes to crash because of an EGL swap buffer)

any ideas?

Answers


You should take a look at this article: http://stuffthathappens.com/blog/2007/10/07/programmers-notebook-uncaught-exception-handlers/

But be careful when using this, you might mask errors in your application and if you resort to this to just pretend your app is working, you're doing it wrong :)


Need Your Help

What's the best way to export bug tracking data from hosted HP Quality Center?

excel bug-tracking quality-center

This question may be too product specifc but I'd like to know if anyone is exporting bug track data from HP Quality Center.

How come I get a NSConcreteMutableData error when using a NSMutableDictionary

ios objective-c nsmutabledictionary

In my appdelegate, I set a couple instances of a custom NSObject (MemoryObject) and store them into an NSMutableDictionary:

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.