Skip to content

NSException does not include reason #3265

@sindresorhus

Description

@sindresorhus

Platform

macOS

Installed

Swift Package Manager

Version

8.9.4

Steps to Reproduce

Call some Apple API which throws an NSException.

Expected Result

I expected the crash report to help me solve the crash, but without a .reason description, it's hard to pin-point the issue.

Actual Result

The report only includes a stack trace, but without the exception reason, it's hard to fix the issue.

All it says is:

NSException > terminating due to uncaught exception of type NSException

Example report: https://sindresorhus.sentry.io/issues/4439865559/events/ec44fb881aa542548650394ce017d6c6/

The stack trace in the above report points to this line: https://github.com/sindresorhus/Actions/blob/e2d1b2ffecb185df81311609d7b0f4cd29f57cf5/Shared/Actions/ParseCSV.swift#L102-L105

This is a big problem, because pretty much all crashes I get are NSException from Apple's frameworks. All my apps are using safe Swift, so they don't generally crash in the app code.

Are you willing to submit a PR?

No

Metadata

Metadata

Labels

No labels
No labels

Projects

Status

Done

Status

No status

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions