]> Cypherpunks repositories - gostls13.git/commit
Support for basic try-catch style exception handling.
authorRobert Griesemer <gri@golang.org>
Fri, 20 Nov 2009 19:50:11 +0000 (11:50 -0800)
committerRobert Griesemer <gri@golang.org>
Fri, 20 Nov 2009 19:50:11 +0000 (11:50 -0800)
commit7763345379bb5520c8571661e4f095c937545ee9
treec6eba54297e0f755e4db2522e954f4554c787643
parent9ac4449cb2bf8fa1fc414a9cbc67c5a46af8ea51
Support for basic try-catch style exception handling.
Meant as illustration of the Go pattern that is using
goroutines and channels to handle exceptional situations.

Note: There is no need for "Finally" since the
"try block" (the function f supplied to Try)
cannot do a Smalltalk-style non-local return
and terminate the function surrounding Try.

Replaces CL 157083.

R=r, rsc
https://golang.org/cl/157087
src/pkg/Makefile
src/pkg/exp/exception/Makefile [new file with mode: 0644]
src/pkg/exp/exception/exception.go [new file with mode: 0644]
src/pkg/exp/exception/exception_test.go [new file with mode: 0644]