Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unified error handling #143

Closed
olemis opened this issue Sep 21, 2019 · 0 comments · Fixed by #186
Closed

Unified error handling #143

olemis opened this issue Sep 21, 2019 · 0 comments · Fixed by #186
Assignees
Labels
core Core interfaces sign_api Altcoin API for signing transactions skyfiber SkyFiber altcoin plugin stdev wip Work in progress
Milestone

Comments

@olemis
Copy link
Contributor

olemis commented Sep 21, 2019

Feature description

Singleton values to represent error conditions .

Is your feature request related to a problem? Please describe.
Inline error objects defined across source code

$ grep -nr 'errors.New' src/
src//core/network.go:78:			return nil, errors.New("There is not available objects")
src//core/network.go:97:		return errors.New(fmt.Sprintf("There is not exist %s poolSection", poolSection))
src//core/network.go:103:		return errors.New(fmt.Sprintf("That object is no from this pool"))
src//util/pluginutil.go:20:	return uint64(0), errors.New(ticker + " <Unregistered>")
Binary file src//coin/skycoin/models/.wallet.go.swp matches
src//coin/skycoin/models/blockchain.go:19:		return nil, errors.New("Block not setted or nil")
src//coin/skycoin/models/blockchain.go:26:		return nil, errors.New("Block not setted or nil")
src//coin/skycoin/models/blockchain.go:33:		return 0, errors.New("Block not setted or nil")
src//coin/skycoin/models/blockchain.go:40:		return 0, errors.New("Block not setted or nil")
src//coin/skycoin/models/blockchain.go:46:		return 0, errors.New("Block not setted or nil")
src//coin/skycoin/models/blockchain.go:53:		return 0, errors.New("Block not setted or nil")
src//coin/skycoin/models/blockchain.go:63:		return true, errors.New("Block not setted or nil")
src//coin/skycoin/models/blockchain.go:133:			return 0, errors.New("Number of Blocks unset ")
src//coin/skycoin/models/network.go:47:		return nil, errors.New(fmt.Sprintf("There is not propers client in %s pool", section))
src//coin/skycoin/models/wallet.go:238:		return "", errors.New("Entropy must be 128 or 256")
src//coin/skycoin/models/wallet.go:371:	return errors.New("Value errors")
src//main/config.go:74:		return errors.New("Invalid Id")

Describe the solution you'd like
Declare single constant and use it consistently across all (related) packages .

@olemis olemis self-assigned this Sep 21, 2019
@olemis olemis added this to To do in FiberCrypto wallet - Iteration 1 via automation Sep 21, 2019
@olemis olemis added this to the 0.27.0 milestone Sep 21, 2019
@olemis olemis added core Core interfaces sign_api Altcoin API for signing transactions skyfiber SkyFiber altcoin plugin stdev wip Work in progress labels Oct 28, 2019
@stdevMac stdevMac self-assigned this Oct 28, 2019
olemis added a commit to simelo/fibercryptowallet that referenced this issue Oct 28, 2019
olemis added a commit to simelo/fibercryptowallet that referenced this issue Oct 28, 2019
olemis added a commit to simelo/fibercryptowallet that referenced this issue Oct 29, 2019
olemis added a commit to simelo/fibercryptowallet that referenced this issue Oct 29, 2019
FiberCrypto wallet - Iteration 1 automation moved this from To do to Done Oct 29, 2019
olemis added a commit that referenced this issue Oct 29, 2019
[main] [models] [sky] fixes #143 - Unified error handling. Error constants
AntiD2ta added a commit to simelo/fibercryptowallet that referenced this issue Nov 7, 2019
…oteWalletTransfer test after merge with develop.
AntiD2ta added a commit to simelo/fibercryptowallet that referenced this issue Nov 7, 2019
AntiD2ta added a commit to simelo/fibercryptowallet that referenced this issue Nov 7, 2019
…and add coverage files in gitignore.

Use make test-cover for test coverage.
AntiD2ta added a commit to simelo/fibercryptowallet that referenced this issue Nov 7, 2019
…tputs.

Upgrade coverage of SkycoinAddress::ScanUnspentOutputs method.
AntiD2ta added a commit to simelo/fibercryptowallet that referenced this issue Nov 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Core interfaces sign_api Altcoin API for signing transactions skyfiber SkyFiber altcoin plugin stdev wip Work in progress
Development

Successfully merging a pull request may close this issue.

2 participants