[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

try-catch - c language

Posted on 2013-12-09
4
Medium Priority
?
452 Views
Last Modified: 2013-12-26
Hi,

Is there try catch feature in objective c? I am doing some code and it is very difficult to get exact reason of error. Like in try -catch, we can get exact error in catch.

Please let me know if there is try-catch and how to implement it? If it is not then how can I catch exact error?

Thanks
0
Comment
Question by:Johny12345
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 26

Assisted Solution

by:tigin44
tigin44 earned 664 total points
ID: 39708005
you can find an example of try catch usage in objective c


http://stackoverflow.com/questions/3363612/try-catch-block-in-objective-c
0
 
LVL 35

Accepted Solution

by:
sarabande earned 668 total points
ID: 39709289
note, you would not get an exception in case of a segmentation fault, means on pointer errors.  you could write  a signal handler which handles those errors and turns them to a NSException. but as far as I know that would not prevent your program from hanging because the code (normally) could not recover from such kind of errors.  

Sara
0
 
LVL 12

Assisted Solution

by:stefan73
stefan73 earned 668 total points
ID: 39715407
@Sara: depends - at least the code could print a stack trace in such a case, or at least try to do so. If the logging modulel itself is affected, this won't work.
0
 

Author Closing Comment

by:Johny12345
ID: 39741105
thanks
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you thought about creating an iPhone application (app), but didn't even know where to get started? Here's how: ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Important pre-programming comments: I’ve never tri…
This is a short and sweet, but (hopefully) to the point article. There seems to be some fundamental misunderstanding about the function prototype for the "main" function in C and C++, more specifically what type this function should return. I see so…
The goal of this video is to provide viewers with basic examples to understand and use structures in the C programming language.
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use nested-loops in the C programming language.
Suggested Courses

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question