Skip to content

Distinguish exceptions that occurs when handling message. #10

Description

@taeguk

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions