JohnSundell / ShellOut

Easily run shell commands from a Swift script or command line tool
MIT License
872 stars 85 forks source link

Add debugDescription to ShellOutError #16

Closed muukii closed 6 years ago

muukii commented 6 years ago

Related: https://github.com/JohnSundell/ShellOut/issues/14

First, sorry, I did mistype about localizedDescription. That's debugDescription.

So, For now, I've implemented debugDescription. But, If ShellOutError.message is stored property, it will be printed by print() normally.

What do you think?

JohnSundell commented 6 years ago

Hope you don't mind @muukii, but I implemented it using CustomStringConvertible and LocalizedError instead here: https://github.com/JohnSundell/ShellOut/pull/20 🙂 That way it's not only for debug, and enables both printing for errors and the correct message to be displayed on the command line when an error is thrown in a script.

Thanks a lot for your contribution and for bringing this up 👍