mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-03 08:46:55 +00:00
use IllegalArgumentException instead (#10745)
This commit is contained in:
@@ -39,7 +39,7 @@ public class ServerConfiguration {
|
||||
if (variables != null && variables.containsKey(name)) {
|
||||
value = variables.get(name);
|
||||
if (serverVariable.enumValues.size() > 0 && !serverVariable.enumValues.contains(value)) {
|
||||
throw new RuntimeException("The variable " + name + " in the server URL has invalid value " + value + ".");
|
||||
throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + ".");
|
||||
}
|
||||
}
|
||||
url = url.replaceAll("\\{" + name + "\\}", value);
|
||||
|
||||
Reference in New Issue
Block a user