There should be a default case, that either throws an exception or provides a default handler. Personally I'd prefer the last one which uses the error log to let the user know about the misconfiguration. This way the handler won't interfere with the application itself.