Class DefaultActionMethodExceptionProcess
java.lang.Object
com.iohao.net.framework.core.flow.internal.DefaultActionMethodExceptionProcess
- All Implemented Interfaces:
ActionMethodExceptionProcess
public final class DefaultActionMethodExceptionProcess
extends Object
implements ActionMethodExceptionProcess
Default exception processor that wraps exceptions into
MessageException.
If the thrown exception is already a MessageException,
it is returned as-is. Otherwise, the exception is logged and wrapped with a generic system error code.
- Author:
- 渔民小镇
- date:
- 2021-12-20
-
Method Summary
Modifier and TypeMethodDescriptionme()Return the singleton instance.Process the given exception and convert it to aMessageException.
-
Method Details
-
processException
Process the given exception and convert it to aMessageException.If the exception is already a
MessageException, it is returned directly. Otherwise, the exception is logged and a newMessageExceptionwith a generic system error code is returned.- Specified by:
processExceptionin interfaceActionMethodExceptionProcess- Parameters:
e- the exception thrown during action method execution- Returns:
- a
MessageExceptionrepresenting the error
-
me
Return the singleton instance.- Returns:
- the singleton
DefaultActionMethodExceptionProcess
-