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

[SR-9933] try! failures include the file path of ErrorType.swift on the jenkins buildnode #52339

Closed
kevints mannequin opened this issue Feb 15, 2019 · 2 comments
Closed
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself

Comments

@kevints
Copy link
Mannequin

kevints mannequin commented Feb 15, 2019

Previous ID SR-9933
Radar None
Original Reporter @kevints
Type Bug
Status Resolved
Resolution Done
Environment

Toolchain org.swift.42120181030a (swift-4.2.1-RELEASE)
macOS 10.14.3

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug
Assignee None
Priority Medium

md5: 006c4d1e7776c895420f3ea88d367cca

Issue Description:

try! failures include the file and line number of ErrorType.swift on the jenkins buildnode. For example:

Kevins-Mac-Pro:~ kevinsweeney$ cat -n test5.swift
     1  enum Fault: Error {
     2      case brokenWing
     3  }
     4
     5  try! { throw Fault.brokenWing }()
Kevins-Mac-Pro:~ kevinsweeney$ xcrun --toolchain org.swift.42120181030a swiftc test5.swift
Kevins-Mac-Pro:~ kevinsweeney$ ./test5
Fatal error: 'try!' expression unexpectedly raised an error: test5.Fault.brokenWing: file /Users/buildnode/jenkins/workspace/oss-swift-4.2-package-osx/swift/stdlib/public/core/ErrorType.swift, line 184
Illegal instruction: 4

In the above example I think we should include the path to test5.swift and line 5 in the fatal error message instead.

@belkadan
Copy link
Contributor

Seems to be fixed on master. I haven't tried with 5.0 yet, though.

@belkadan
Copy link
Contributor

Yep, looks like it's fixed in 5.0 too!

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself
Projects
None yet
Development

No branches or pull requests

1 participant