You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So, the old interface provided access to stderr. The new one assumes that all values emitted should go to stdout. It assumes that all errors should be returned via SetError. Unfortunately, this makes it impossible to migrate some commands without breaking the API.
Also, as I've stated in #62, I'd like to just use SetError for terminal errors. That is, "status" errors are just output.
The text was updated successfully, but these errors were encountered:
Stebalien
changed the title
Writing to stderr from commands
Writing to stderr from CLI encoder
Mar 5, 2018
So, I tried using a PostRun to fix this (splitting out errors from non-errors in the post run). However, it turns out that correctly handling errors from res.Next() is an utter nightmare and not even HandleError does this correctly (it doesn't take multiple errors into account). Given that none of our code uses this "multiple error" system, I'm going to assume that anything that tries to use it will break horribly.
One solution is to return the error as an error from the encoder. However, we'll need to modify the encoding logic to continue when it encounters an error.
So, the old interface provided access to stderr. The new one assumes that all values emitted should go to stdout. It assumes that all errors should be returned via
SetError
. Unfortunately, this makes it impossible to migrate some commands without breaking the API.Also, as I've stated in #62, I'd like to just use
SetError
for terminal errors. That is, "status" errors are just output.The text was updated successfully, but these errors were encountered: