mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-18 11:54:59 -04:00
Config: throw correct exception
This commit is contained in:
parent
a1e7c8cbf7
commit
1b93449347
@ -233,7 +233,7 @@ public class Configuration {
|
|||||||
case CLIENT_TOKEN -> json.getAsJsonObject("accounts").get("client-token").getAsString();
|
case CLIENT_TOKEN -> json.getAsJsonObject("accounts").get("client-token").getAsString();
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
throw new RuntimeException();
|
throw new IllegalArgumentException();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void saveData(JsonObject input, ConfigurationPaths.ConfigurationPath path, Object data) {
|
private void saveData(JsonObject input, ConfigurationPaths.ConfigurationPath path, Object data) {
|
||||||
@ -258,6 +258,8 @@ public class Configuration {
|
|||||||
case RESOURCES_URL -> input.getAsJsonObject("download").getAsJsonObject("urls").addProperty("resources", string);
|
case RESOURCES_URL -> input.getAsJsonObject("download").getAsJsonObject("urls").addProperty("resources", string);
|
||||||
case CLIENT_TOKEN -> input.getAsJsonObject("accounts").addProperty("client-token", string);
|
case CLIENT_TOKEN -> input.getAsJsonObject("accounts").addProperty("client-token", string);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
throw new IllegalArgumentException();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user