Questions tagged [nsexception]

NSException is a Mac Developer Library class used to implement exception handling and contains information about an exception.

NSException is a Mac Developer Library class used to implement exception handling and contains information about an exception.

It is available in OS X v10.0 and later and is declared in NSException.h

259 questions
0
votes
1 answer

Landscape orientation lock not working when trying to open photo gallery Swift

I am making an app that allows the user to open the photo gallery to change a picture in an image view. Whenever I lock the orientation to landscape mode, to avoid gross constraints and the app overall shoving everything I love off the screen, the…
zach2161
  • 113
  • 11
0
votes
1 answer

iOS: log to file any crashing exception

Any of you knows how can I log any crash exception from iOS app?. I forcing a crash on my viewController: - (void)viewDidLoad { [super viewDidLoad]; NSArray *myArray = [NSArray new]; NSLog(@"%@", [myArray objectAtIndex:0]); } and I try…
user2924482
  • 8,380
  • 23
  • 89
  • 173
0
votes
1 answer

Array Mutation whilst being Enumerated

so my issue is happening only when I have two enemies on a team in my game. If it's a one versus one.. I do not get the issue. Please look at my code and see if you can gather as to why I'm getting this fatal error. Removes Target from players…
Daniel
  • 285
  • 3
  • 12
0
votes
1 answer

What is it that is causing the NSInvalidArgumentException?

I've searched a lot but I can't find what I'm doing wrong. I'm trying to get 2 numbers that are stored in Firebase (uses a json file) and then create google maps markers with one of these numbers being the latitude and the other the longitude. …
0
votes
0 answers

Terminating with uncaught exception of type NSException - Xcode 8 beta 6

in the last weeks i updated my Xcode until the last beta, Xcode 8 beta 6. Before these upgrades all worked well, but now i am getting some problems. I have a tab bar application. When I tap on the last tab, I get the Error Sigabrt and the console…
Try develop
  • 21
  • 3
  • 8
0
votes
0 answers

@throw & [NSException raise] not working in Objective-C Project OSX

I have a project where throwing an exception is not doing anything. I have this lines of code at the end of applicationDidFinishLaunching: @throw [NSException exceptionWithName:@"exception name" reason:@"reason" userInfo:nil]; [NSException…
the Reverend
  • 12,305
  • 10
  • 66
  • 121
0
votes
1 answer

Swift 2, unrecognized selector sent to instance for UIAlertController

I am getting an error as below while I am tapping on TableView after click on Search. Error Below 2016-06-03 11:20:31.578 ContactPLUS[1724:678512] Warning: Attempt to present on which is already presenting (null) st >> 2016-06-03 11:20:32.001…
dhaval shah
  • 4,499
  • 10
  • 29
  • 42
0
votes
2 answers

Create NSException from IntPtr

I referring to this post: private static void MyUncaughtExceptionHandler(IntPtr exception) { // this is not working because NSException(IntPtr) is a protected constructor var e = new NSException(exception); // ... } How can I create an…
testing
  • 19,681
  • 50
  • 236
  • 417
0
votes
2 answers

Terminating with uncaught exception of type NSException in Button

I'm creating a simple Tic Tac Toe game in swift. My playAgain button causes an uncaught exception, and I can't seem to figure out why. var buttonToClear : UIButton for var i = 0; i < 9; i++ { buttonToClear = view.viewWithTag(i) as! UIButton …
0
votes
2 answers

@throw not caught by @catch block?

If there is a code which looks like @try { @throw [NSException new]; } @catch (NSException ex) { NSLog(@"exception caught"); } in this case, the code does not go to @catch block, rather the application crashes. How should we catch…
prabodhprakash
  • 3,825
  • 24
  • 48
0
votes
3 answers

Swift Project Terminating with uncaught exception of type NSException

Unrecognized selector sent to instance 0x7feca9469620 2016-05-10 19:34:58.781 TribeA2[76123:4834825] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[TribeA2.RegisterPageViewController…
EJackson
  • 83
  • 6
0
votes
0 answers

Objective-c: catching exceptions from third-party libraries

I'm developing a framework that wraps many other third-party frameworks and unifies them under a single API. Since I can't be sure that other developer are catching every exception they man cause, I wrap every call to a third-party library with…
Yotam
  • 9,789
  • 13
  • 47
  • 68
0
votes
1 answer

App crashes on loading modal window

So I'm new to working with Xcode and trying to fix an existing app. The trouble I'm having is with loading in a HTML file into a modal window. This is the code I think is relevant: -(void) loadScreen { [super loadScreen]; formView =…
jampez77
  • 5,012
  • 7
  • 32
  • 52
0
votes
1 answer

import a .xcdatamodel in CoreData CLI

i've a little Problem with a CoreData Command Line Tool. I simply created a new Project in XCode (Core Data CLI), created a Data Model in the .xcdatamodel File and auto generated a Header file. Finaly i modified the Code, wich should able to load…
Dennis Stritzke
  • 5,198
  • 1
  • 19
  • 28
0
votes
1 answer

NSTimer Throwing Exception

I'm currently struggling to implement even the simplest of timers into my project, since every one I try gives me this error log: 2015-12-19 14:23:47.164 Reanimate[14879:898570] -[Reanimate.helicut timerFunc]: unrecognized selector sent to…
user2992997
  • 629
  • 2
  • 6
  • 9