Throw an exception of registering a command fails instead of writing a
log entry