Uploaded image for project: 'Swift'
  1. Swift
  2. SR-905

precondition failure should show message in crash report

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Medium
    • Resolution: Unresolved
    • Component/s: Standard Library
    • Labels:
      None
    • Environment:

      OS X

      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.

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            swillits Seth Willits
            Votes:
            4 Vote for this issue
            Watchers:
            12 Start watching this issue

              Dates

              Created:
              Updated: