Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修改了一个不是问题的问题:对传入的数组做了下判断,只接收NSString类型的数据,不然会造出崩溃! #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nonstriater
Copy link

No description provided.

@tangqiaoboy
Copy link
Owner

谢谢你提交pull request。对于这个,我比较倾向于让它崩溃,因为如果在这里容错了的话,后面的cancelButtonIndex和destructiveButtonIndex就会受影响,可能会让调用者更加迷惑。调用者会想,我明明是让第三个按钮代表cancel,为什么你算成第四个了(其实他不知道是因为他传的array数据不对造成的)。
不过为了让崩溃时开发者更好调试,应该在console里面输出错误信息,这样开发者就更好调试了。
你觉得呢?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants