Giter Site home page Giter Site logo

Define a domain exception. about enode HOT 2 CLOSED

tangxuehua avatar tangxuehua commented on May 23, 2024
Define a domain exception.

from enode.

Comments (2)

tangxuehua avatar tangxuehua commented on May 23, 2024

After some consideration, we decide do not define a domain exception class. We allow user to throw any exception in the domain. And enode framework check if it catch the ENodeException, then the command will be retry authomatically. ENode framework will enusre that the ENodeException will only be throwed by enode framework, and commonly this exception in the command handler is throwed when user call context.Get method. If this method throw ENodeException, that means there are some io exceptions occurrs when accessing the redis memory cache or event store. So in this case, the command should be retried always until success.

from enode.

tangxuehua avatar tangxuehua commented on May 23, 2024

For the above design, developer should understand the developing rule that if the command handler throws ENodeException, than the command handler will be retried automatically; otherwise the command will not be retried and the error will back to user (like controller).

Developer can throw any exception in the command handler except ENodeException.

from enode.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.