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

发现闪退场景 #120

Open
sharehoney opened this issue Mar 17, 2022 · 3 comments
Open

发现闪退场景 #120

sharehoney opened this issue Mar 17, 2022 · 3 comments

Comments

@sharehoney
Copy link

id obj = [examQuestionDict valueForKey:@"item"];

[NSMutableArray arrayWithArray: obj] ———— 闪退。

后来发现 obj 是个字符串。

@jezzmemo
Copy link
Owner

源码能否完整点,不是很明白

@sharehoney
Copy link
Author

sharehoney commented Mar 21, 2022 via email

@sharehoney
Copy link
Author

谢谢回应。

id obj = [examQuestionDict valueForKey:@"item"];

—— 这里的 obj 是个字符串,但我错把它当做数组了。

NSMutableArray *otherArr = [NSMutableArray arrayWithArray: obj]

—— 使用 obj 初始 其他数组时 就报错闪退了。

其实 根本上说,应该是后台的事,或者 在使用obj时判断一下类型;

JJException不可能应对所有的异常场景是吧。

谢谢你的作品。

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

No branches or pull requests

2 participants