Skip to content

[SR-905] precondition failure should show message in crash report #43517

@swift-ci

Description

@swift-ci
Previous ID SR-905
Radar rdar://problem/40723738
Original Reporter swillits (JIRA User)
Type Bug
Environment

OS X

Additional Detail from JIRA
Votes 5
Component/s Standard Library
Labels Bug
Assignee None
Priority Medium

md5: e8379b37c0510613305dc3534aa2b4d1

Issue Description:

On OS X, if a precondition fails, the crash report contains no mention of the precondition. By contrast a fatalError("The message.") call, in the crash report does show:

fatal error: The message.: file /path/to/file.swift, line 55

precondition failures should do the same thing, just as fatalError() does and just as assert() does in C/Obj-C.

It is far more useful to have this information in the crash report than not, and there's no reason it shouldn't appear. I consider this a bug as the message is simply lost in a release configuration even though the precondition is still checked.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.standard libraryArea: Standard library umbrella

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions