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

PostgreSQLError.stackTrace should be optional #146

Closed
tonyarnold opened this issue Oct 10, 2019 · 4 comments
Closed

PostgreSQLError.stackTrace should be optional #146

tonyarnold opened this issue Oct 10, 2019 · 4 comments
Labels
bug Something isn't working

Comments

@tonyarnold
Copy link

As per the original Core.Debuggable protocol, this property should return an optional type: https://github.com/vapor/core/blob/18f2436bf7a6bc2224372c0885db2e0159af1649/Sources/Debugging/Debuggable.swift#L31

I can't access the contents of this property in use, as the protocol has an extension method that returns nil with the correct optionality.

@tonyarnold
Copy link
Author

Oh, I see: vapor/core#182

Well, this sucks.

@tanner0101 tanner0101 added the bug Something isn't working label Oct 14, 2019
@tanner0101
Copy link
Member

@tonyarnold the PR you referenced there was trying to change the Debuggable protocol to have non-optional stack trace. That would definitely break things. But I think we can fix this issue in Postgres without making any breaking changes.

@tanner0101
Copy link
Member

Actually no, Swift isn't letting me add a deprecation. I still think we should fix this, though. See my reasoning in #147.

@tonyarnold
Copy link
Author

I think in a future release, making the stack trace property non-optional makes sense (you can always check if it's empty, right?). Thanks for looking into this, @tanner0101 - I appreciate your time and efforts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants