How to enable Objective-C exceptions on Xcode 4.2?
Asked Answered
N

1

8

maybe I'm being daft or something but I've added a @try @catch block to my code and I'm getting a "cannot use @try with object-c exceptions disabled" error that prevents compilation...

How do I turn it on? I've searched all around, added the exception breakpoint thing and no results...How do I do this?

Negotiation answered 7/8, 2012 at 23:8 Comment(1)
If you are using @catch to recover from exceptions, you are doing it wrong. Exceptions are not to be used for anything but unrecoverable errors.Zwickau
W
28

Check if you have enabled exceptions on the project and/or target build settings. Project Navigator -> select project or target -> build settings -> Enable Objective-C Exceptions exceptions setting

Wilek answered 7/8, 2012 at 23:17 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.