Skip to content

[ecosystemincentive] Handle error case in more constructive and strict way #594

@taiki1frsh

Description

@taiki1frsh

In a method of Hooks, return err cannot be used. (technically it's possible,but it's just meaningless)

So, we emit panic.
But, emitting panic doesn't provide any information.
For better operation and explicit, make panic more helpful in a united form.

  • Provide the state info at the time of the panic
  • Provide the reason of the panic
  • (Possibly provide the solution for the panic)
  • Assure only this function goes back to the previous state

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions