Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add error handler as options to all the API #50

Open
doanduyhai opened this issue Feb 27, 2014 · 1 comment
Open

Add error handler as options to all the API #50

doanduyhai opened this issue Feb 27, 2014 · 1 comment
Milestone

Comments

@doanduyhai
Copy link
Owner

  1. Define an interface AchillesErrorHandler like:
public interface AchillesErrorHandler {

    // Process exception here. 
    Object onError(Exception exception); 
}

Example of usage:

entityManager
.insert(entity)
.withErrorHandlers(myHandler1,myHandler2)
.execute();
@doanduyhai
Copy link
Owner Author

We can also extend this concept to provide successHandler too, to return tracing results if it is activated

@doanduyhai doanduyhai changed the title [Enhancement] Add error handler as options to all the API Add error handler as options to all the API May 29, 2014
@doanduyhai doanduyhai added this to the 4.0 milestone Dec 22, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant