Subscribe ( )

iPhone Programming Tutorials

 

Forum

You must be logged in to post Login Register

Search 

approaches to error reporting?

User Post

6:17 am
October 29, 2008


colour me brad

Noob

Halifax, NS, Canada

posts 3

1

Hi all, I'm just getting started on iPhone dev (this blog's Todo List tutorial was a major step forward for me). One question I have is, what kinds of approaches people are having regarding error reporting. The tutorial uses NSAssert1 calls, but they just blow up the app in the simulator, so I'm digging in to try to come up with a real error reporting mechanism. The first vague idea I have is to have a separate view that displays the error and when an error occurs I load that view and switch to it. Does that make sense?

cheers,

Brad

7:00 am
October 29, 2008


colour me brad

Noob

Halifax, NS, Canada

posts 3

2

Managed to find it on my own (or at least one way of doing it). UIAlertView is a modal 'message box' that will work nicely for my purposes

brad

8:51 am
October 29, 2008


jab2109

iCoder

posts 8

3

When you use NSAssert you don't really want to tell the user there was a problem. The point of the Assert mechanism is to tell the programmer that something went wrong that shouldn't have, like a database query failing. UIAlertView should be used to ask the user a question, such as “Would you really like to go back? YES/NO”. It should not really be used for handling errors in your code.

11:34 am
October 29, 2008


colour me brad

Noob

Halifax, NS, Canada

posts 3

4

Ok, so how would you go about telling them of an error?


About the iCodeBlog forum

Currently Online:

5 Guests

Maximum Online: 25

Forums:

Groups: 2

Forums: 6

Topics: 194

Posts: 585

Members:

There are 356 members

There are 1 guests


Brandon has made 87 posts

Top Posters:

bobcubsfan - 52

crazyiez - 30

VertigoSol - 26

AdeC - 17

Uhu - 17

Administrator: Brandon | Moderators: VertigoSol


© - Version 3.1.4 (Build 357)