Just an FYI: this can have a return type of OperationFailedException, and then the usage is simply 

throw MESSAGES.invalidDiscoveryOptionsOrdering(name);