feat(errors): Add ErrStopIterating (#15989)

This commit is contained in:
Facundo Medica 2023-04-29 12:56:54 -03:00 committed by GitHub
parent 07daf15e49
commit 3ee8242364
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View File

@ -31,6 +31,10 @@ Ref: https://keepachangelog.com/en/1.0.0/
## [Unreleased]
### Features
* [#15989](https://github.com/cosmos/cosmos-sdk/pull/15989) Add `ErrStopIterating` for modules to use for breaking out of iteration.
## v1.0.0
### Features

View File

@ -16,6 +16,9 @@ var (
// errInternal should never be exposed, but we reserve this code for non-specified errors
errInternal = Register(UndefinedCodespace, 1, "internal")
// ErrStopIterating is used to break out of an iteration
ErrStopIterating = Register(UndefinedCodespace, 2, "stop iterating")
// ErrPanic should only be set when we recovering from a panic
ErrPanic = Register(UndefinedCodespace, 111222, "panic")
)