simple-command-bus
Version:
Simple Command Bus
12 lines (8 loc) • 365 B
JavaScript
import createException from './createException';
const InvalidHandlerMethodException = createException('InvalidHandlerMethodException', {
message: 'Invalid handler method.'
});
InvalidHandlerMethodException.forMethod = (method) => {
throw new InvalidHandlerMethodException(`Invalid handler method ${method}.`);
};
export default InvalidHandlerMethodException;