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
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.