Implemented error handling for CommandRegistry.getAllCommandNames()