Commit Graph

39 Commits

Author SHA1 Message Date
Aaron Craelius e44612f33d
fix: errors go.mod has wrong module path (#10808) 2021-12-17 21:03:16 -05:00
Aaron Craelius 4d0d376c4b
feat: standalone errors go.mod (#10779)
## Description

This PR:
* moves all of the `types/errors` code to a new `errors` go module, except:
  * the `RootCodespace` errors in `types/errors` stay there
  * ABCI stuff that depends on tendermint stays in `types/errors
* adds aliases to everything in `types/errors` referencing `errors` so **this is not a breaking change**

This will allow standalone go modules to use the same error types as the SDK. In particular, I want the `orm` to reference `errors` and then the SDK will be able to import `orm` and it can stay standalone. The same could apply to the `db` module.

After this PR the plan is to:
* tag `github.com/cosmos/cosmos-sdk/errors` as `v1.0` 🎉 
* remove the `replace` directive for `errors` in the main SDK `go.mod`

---

### Author Checklist

*All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.*

I have...

- [x] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] added `!` to the type prefix if API or client breaking change
- [x] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#pr-targeting))
- [ ] provided a link to the relevant issue or specification
- [ ] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules)
- [ ] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#testing)
- [ ] added a changelog entry to `CHANGELOG.md`
- [ ] included comments for [documenting Go code](https://blog.golang.org/godoc)
- [ ] updated the relevant documentation or specification
- [x] reviewed "Files changed" and left comments if necessary
- [ ] confirmed all CI checks have passed

### Reviewers Checklist

*All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.*

I have...

- [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] confirmed `!` in the type prefix if API or client breaking change
- [ ] confirmed all author checklist items have been addressed 
- [ ] reviewed state machine logic
- [ ] reviewed API design and naming
- [ ] reviewed documentation is accurate
- [ ] reviewed tests and test coverage
- [ ] manually tested (if applicable)
2021-12-17 21:53:08 +00:00
Jae Kwon 11cccfaf02 New error API 2018-01-18 00:44:54 -08:00
Ethan Buchman 5f76febce8 auth and bank compile 2018-01-12 19:17:17 -08:00
Jae Kwon ba2b4f0f21 WIP: refactor
Refactor

* No more decorators, but rather types.AntiHandler
* No more handlers, but rather types.MsgHandler
* Ability to pass "stores" in NewXYZHandler()
* Coins live in types, and Accounts have coins
* Coinstore -> bank
2018-01-12 19:17:17 -08:00
Ethan Buchman 1d07f88867 new basecoin example 2018-01-03 20:20:21 -05:00
Jae Kwon 62f736fbd0 Update comment on usage of sdkErrors 2017-12-21 17:56:57 -08:00
Jae Kwon 6b5f08e918 Fix errors/ and x/coin/errors.go 2017-12-21 03:31:33 -08:00
Ethan Buchman a9b2636439 Coin (#312)
* wip: tests and fixes for kvstore iteration
* update for latest tmlibs
* types compiles
* x/coin almost compiles
* x/coin: move things out of the way so it builds
* rebase fixes
* update glide
* add test for ChainDecorators
2017-12-21 03:31:33 -08:00
Jae Kwon b96e4784ed Draft of new BaseApp 2017-12-01 09:10:17 -08:00
Jae Kwon ec31313bc2 Add errors 2017-11-29 21:27:03 -08:00
Jae Kwon 561d77cae0 remove errors module 2017-10-31 17:58:12 -05:00
Ethan Frey 374f078b79 IBC test just rawtx, coin ibc in that module 2017-07-27 16:27:06 -04:00
Ethan Frey 9b099a2f36 Fix up ibc to work with new cli reorg 2017-07-27 16:25:05 -04:00
rigel rozanski 8617841296 errors cleanup 2017-07-19 01:23:13 -04:00
rigel rozanski 3d5cf393b9 PR changes 2017-07-18 12:08:29 +02:00
rigel rozanski 5ccf22bfb7 frey changes 2017-07-18 12:08:28 +02:00
rigel rozanski 6e07dbe7c3 nonce testing 2017-07-18 12:08:28 +02:00
rigel rozanski 16b039534d working sequence number with errors 2017-07-18 12:08:28 +02:00
Ethan Frey a508990e08 Cleaned up fees and errors a bit from feedback 2017-07-13 16:20:21 +02:00
Ethan Frey 5950ff34e3 remove sequence number from coins 2017-07-12 19:25:14 +02:00
Ethan Frey 11a8c0d9a2 Add roles middleware and handler 2017-07-11 13:55:28 +02:00
Ethan Frey 765f52e402 Enforce the expiration height in Chain middleware 2017-07-10 12:36:30 +02:00
rigel rozanski 82c0f98235 more golint updating 2017-07-06 23:37:45 -04:00
Ethan Frey 768427dcc0 Removed dependency of errors on basecoin main 2017-07-06 15:20:56 +02:00
rigel rozanski 0303f2aaaa golinted up to and incl modules 2017-07-06 05:30:03 -04:00
Ethan Frey fcab8ac901 Write dispatcher, change SetOption arguments 2017-07-04 12:22:06 +02:00
Ethan Frey 995452ea02 Complete error package overhaul 2017-07-03 14:50:33 +02:00
Ethan Frey 5fa77bf647 Refactor errors package, so we can do type-checking IsXXErr() 2017-07-03 14:22:46 +02:00
Ethan Frey 2fc4da1076 Rough draft of the new coins storage 2017-06-30 20:55:23 +02:00
Ethan Frey 37796002ae Start on coin handler 2017-06-30 18:37:51 +02:00
Ethan Frey aa0c246f64 tmerror now dumps stack trace on %+v as well 2017-06-30 18:37:51 +02:00
Ethan Frey 82281aa3bb Add logger and chain middleware, default stack 2017-06-30 18:37:50 +02:00
Ethan Frey 4883476166 Add recovery middleware, test stack 2017-06-30 18:37:50 +02:00
Ethan Frey ab72ca881e Add fee handler and signer handler to show how layering works 2017-06-30 18:37:49 +02:00
Ethan Frey be89f1f582 Clean up error handling 2017-06-30 18:37:48 +02:00
Ethan Frey 9db18750be Added ValidateBasic() to all Tx for easy stateless pre-filtering 2017-06-30 18:37:48 +02:00
Ethan Frey 2c9123224e Add refactored SendTx, chain filter, and new error codes 2017-06-30 18:37:48 +02:00
Ethan Frey c130603d10 Import errors from personal tmflow repo, and cleanup 2017-06-30 18:37:48 +02:00