Skip to content

Commit 24df9e4

Browse files
committed
[feature/betterlogs] Changed exception kind in config
1 parent 6882746 commit 24df9e4

File tree

1 file changed

+11
-11
lines changed
  • JShellAPI/src/main/java/org/togetherjava/jshellapi

1 file changed

+11
-11
lines changed

JShellAPI/src/main/java/org/togetherjava/jshellapi/Config.java

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,16 @@ public record Config(
1616
long dockerResponseTimeout,
1717
long dockerConnectionTimeout) {
1818
public Config {
19-
if(regularSessionTimeoutSeconds <= 0) throw new RuntimeException("Invalid value " + regularSessionTimeoutSeconds);
20-
if(oneTimeSessionTimeoutSeconds <= 0) throw new RuntimeException("Invalid value " + oneTimeSessionTimeoutSeconds);
21-
if(evalTimeoutSeconds <= 0) throw new RuntimeException("Invalid value " + evalTimeoutSeconds);
22-
if(evalTimeoutValidationLeeway <= 0) throw new RuntimeException("Invalid value " + evalTimeoutSeconds);
23-
if(sysOutCharLimit <= 0) throw new RuntimeException("Invalid value " + sysOutCharLimit);
24-
if(maxAliveSessions <= 0) throw new RuntimeException("Invalid value " + maxAliveSessions);
25-
if(dockerMaxRamMegaBytes <= 0) throw new RuntimeException("Invalid value " + dockerMaxRamMegaBytes);
26-
if(dockerCPUsUsage <= 0) throw new RuntimeException("Invalid value " + dockerCPUsUsage);
27-
if(schedulerSessionKillScanRateSeconds <= 0) throw new RuntimeException("Invalid value " + schedulerSessionKillScanRateSeconds);
28-
if(dockerResponseTimeout <= 0) throw new RuntimeException("Invalid value " + dockerResponseTimeout);
29-
if(dockerConnectionTimeout <= 0) throw new RuntimeException("Invalid value " + dockerConnectionTimeout);
19+
if(regularSessionTimeoutSeconds <= 0) throw new IllegalArgumentException("Invalid value " + regularSessionTimeoutSeconds);
20+
if(oneTimeSessionTimeoutSeconds <= 0) throw new IllegalArgumentException("Invalid value " + oneTimeSessionTimeoutSeconds);
21+
if(evalTimeoutSeconds <= 0) throw new IllegalArgumentException("Invalid value " + evalTimeoutSeconds);
22+
if(evalTimeoutValidationLeeway <= 0) throw new IllegalArgumentException("Invalid value " + evalTimeoutSeconds);
23+
if(sysOutCharLimit <= 0) throw new IllegalArgumentException("Invalid value " + sysOutCharLimit);
24+
if(maxAliveSessions <= 0) throw new IllegalArgumentException("Invalid value " + maxAliveSessions);
25+
if(dockerMaxRamMegaBytes <= 0) throw new IllegalArgumentException("Invalid value " + dockerMaxRamMegaBytes);
26+
if(dockerCPUsUsage <= 0) throw new IllegalArgumentException("Invalid value " + dockerCPUsUsage);
27+
if(schedulerSessionKillScanRateSeconds <= 0) throw new IllegalArgumentException("Invalid value " + schedulerSessionKillScanRateSeconds);
28+
if(dockerResponseTimeout <= 0) throw new IllegalArgumentException("Invalid value " + dockerResponseTimeout);
29+
if(dockerConnectionTimeout <= 0) throw new IllegalArgumentException("Invalid value " + dockerConnectionTimeout);
3030
}
3131
}

0 commit comments

Comments
 (0)