Go Wiki: Go2ErrorHandlingFeedback

Feedback re Go 2 Error Handling Draft Design

This page is meant to collect and organize feedback and discussion started with the Go 2 error handling draft design.

Please post feedback on your blog, Medium, GitHub Gists, mailing lists, Google Docs, etc. And then please link it here.

Please help categorize the rest of the uncategorized proposals at the bottom.

Update, June 19, 2019 – Based on this feedback we have posted a proposal for a try builtin, which produced significant feedback on #32437 (threaded view here).

We’ve disabled comments on that issue until July 1 to give people time to experiment in their own code. We would very much like to see experience reports about using the general try approach in your own code, including trial conversions with tryhard. Thanks!

Experience with the “try proposal”

Add to this list:


Requirements

Discussions of the requirements for a new error handling method.

In support

This includes supporting the existing chaining/stacking of handlers without changes.

Example code

Code changed to use the existing proposal.

Against

Critiques without counter-proposals

Recurring themes

Concepts that appear repeatedly among the suggestions below.

Modest revisions

Remove handler chaining

Counter-proposals

Error handling with normal functions

Labeled error handlers

Inlining

Use defer

try/catch/finally syntax

Other possibilities

Uncategorized

Please help categorize the rest of the proposals here.

Adding your feedback

Please format all entries as below.

To make it easier to see new feedback, please add your new proposal to the top of the section it is placed in.


This content is part of the Go Wiki.