Solved

try-catch - c language

Posted on 2013-12-09
4
420 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 166 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 34

Accepted Solution

by:
sarabande earned 167 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 167 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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 tutorial is posted by Aaron Wojnowski, administrator at SDKExpert.net.  To view more iPhone tutorials, visit www.sdkexpert.net. This is a very simple tutorial on finding the user's current location easily. In this tutorial, you will learn ho…
The goal of this video is to provide viewers with basic examples to understand opening and writing to files 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.

729 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