问题标签 [nsexception]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
iphone - 处理错误/异常并将它们记录在 iPhone 应用程序中
我想知道当 iPhone 应用程序运行以用于稍后的调试目的时,我们是否需要将异常/错误记录在文件系统的公共文件中?或者这是由 IOS 通过设备日志自动处理的?
我现在使用可以在 consol 上打印的 NSLog 语句,但是在 Java 中是否有类似于 log4j 的东西,您可以将所有调试语句(包括错误/异常)放在一个文件中,以便稍后进行分析。
处理这种情况的最佳方法是什么。
iphone - MFMailComposeViewController 提出 NSException
我已经对这个问题进行了搜索,但没有找到答案,这导致我在这里写下我的第一个问题。
问题是当我按下调用下面方法的按钮时,我在这一行得到一个异常:[self presentModalViewController:mailViewController animated:YES];
异常是:
*由于未捕获的异常“NSInvalidArgumentException”而终止应用程序,原因:“-[NSCFString 计数]:无法识别的选择器发送到实例 0x20f6c”
此外,如果有帮助,我会在模拟器上运行我的应用程序。
我从这里得到了代码的大部分。
这是我的代码(电子邮件地址为空白):
似乎是什么导致了异常?
iphone - 'NSException' Error, Crashes after pressing rectangle button - Cocoa Touch
I've made a rectangle button, which, when the user taps it they go to their iPod.
I get this error once I press the button when debugging. I've checked thoroughly on the iPod code and everything seems to be correct.
Here is the error from the debugger called after throwing an instance of NSException
:
ios - 在抛出“NSException”实例后调用终止
我尝试运行我的应用程序,但我抛出了一个异常,在控制台中我得到了这个:
我注意到我明白了,因为我尝试将注释用于我的地图视图,请帮助,提前谢谢 :)
编辑
这是我的for
循环,可能会出现问题:
iphone - 表视图不断给出 NSException 和崩溃
嗨,我是 iphone 的新手,从 iphone 开始,我被困在表格视图中,我的应用程序不断给出 NSException 和崩溃
一旦我在 xib 应用程序中添加 tableView 开始崩溃这是 TableViewController.m 的代码
这是日志
iphone - iphone中的异常抛出JSON支持程序
我下载了 JSON 文件。我在项目目录中添加了这些文件。但是当我运行程序时,我收到一个错误,它是......
-[__NSCFDictionary JSONRepresentation]:无法识别的选择器发送到实例 0x6003d50
* 由于未捕获的异常“NSInvalidArgumentException”而终止应用程序,原因:“-[__NSCFDictionary JSONRepresentation]:无法识别的选择器发送到实例 0x6003d50”*第一次抛出调用堆栈:
我导入了头文件#import "JSON/JSON.h"
,并在 viewDidLoad 函数中编写了 jsocn 代码,如下所示...
请帮助我。
提前致谢。
iphone - iphone:带表格视图的问题
我在 iphone 中的表格视图有问题.. 我不知道为什么它每次都会崩溃,这是代码
它在 cell.textLabel.text = [animals objectAtIndex:row]; 行崩溃 并告诉我由于未捕获的异常“NSInvalidArgumentException”而终止应用程序,原因:'-[__NSCFDictionary objectAtIndex:]: unrecognized selector sent to instance
objective-c - NSInvalidArgumentException 未在代码中捕获
我正在使用选择器来动态调用 Objective-C 中的函数。我的问题是,如果我传递一个不存在的函数名,我的@try
/@catch
块不会捕获异常。
在控制台中,我得到一个 uncaught NSInvalidArgumentException
,再往下,我得到一个 uncaught NSException
。
我尝试在标准@try
/@catch
块中捕获这两种类型的异常,但它们没有注册。如果我尝试捕捉,Xcode 不会让我编译,NSInvalidArgumentException
因为它不是可识别的类型。
关于如何解决这个问题的任何想法?
iphone - iphone - 尝试,抓住问题
我有一个方法,它有几个部分可以引发异常。如果这些部件之一发生故障,我希望运行清洁方法。我正在考虑使用 try/catch 指令。
我的问题是:我是否必须对可能引发异常的每一行代码使用一个指令,或者我可以简单地将整个方法包含在这样的块中?
在这种情况下,哪条线路产生问题对我来说并不重要。我只需要该方法成功运行或做其他事情以防它失败。
谢谢
xcode4 - NSException error seems to occur randomly
This code was working fine, now for some reason I'm getting an NSException error that's generating a SIGABRT at the following line of code...
Here's the method it's located in...
I'm new at this as you can probably tell. Any ideas as to what's generating the NSException?