Open
Description
We need to distinguish exceptions that occurs when handling message.
Now, there is a ambiguous division in our codes.
This means instability.
So, we need to divide those exceptions into four things.
1. Known exceptions occurs. And they mean a invalid message.
- Pass these exceptions. And pass a message.
- Pass these exceptions. And report a failure to sender.
2. Known exceptions occurs. And they just mean a known failure of functions.
They mean just "we can handle these exceptions"
- Handle these exceptions by known(=already defined) solution.
3. Unknown exceptions occurs. But we can recover a current state to be a state before occurrence of a exception.
They are likely to mean "bugs of codes" or a external problem. But we can recover a state.
- Recover a state. And ignore a message or report a failure to sender. And log about unknown exceptions for debugging.
- Die for immediate debugging.
4. Unknown exceptions occurs. And we can't recover...
They are likely to mean "bugs of codes" or a external problem. And we can't recover a state.
- Die