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?

Search 

About the iCodeBlog forum

Most Users Ever Online:

44


Currently Online:

4 Guests

Forum Stats:

Groups: 2

Forums: 6

Topics: 419

Posts: 893

Membership:

There are 935 Members

There has been 1 Guest

There are 2 Admins

There is 1 Moderator

Top Posters:

bobcubsfan – 54

crazyiez – 30

Uhu – 17

AdeC – 17

Nick – 15

jitesh61 – 12

Administrators: Brandon (88 Posts), Collin (0 Posts)

Moderators: VertigoSol (26 Posts)



©   

  • Posted by on 6 Aug 2008 in Uncategorized
  •   |  
  •   |  
  •   |  
  • Comments Off

Comments are closed.