mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
os: add ErrClosed, return for use of closed File
This is clearer than syscall.EBADF. Fixes #17320. Change-Id: I14c6a362f9a6044c9b07cd7965499f4a83d2a860 Reviewed-on: https://go-review.googlesource.com/30614 Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
parent
452bbfc179
commit
212d2f82e0
10 changed files with 70 additions and 30 deletions
|
|
@ -14,6 +14,7 @@ var (
|
|||
ErrPermission = errors.New("permission denied")
|
||||
ErrExist = errors.New("file already exists")
|
||||
ErrNotExist = errors.New("file does not exist")
|
||||
ErrClosed = errors.New("file already closed")
|
||||
)
|
||||
|
||||
// PathError records an error and the operation and file path that caused it.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue