Skip to content

Commit

Permalink
Changed adding results to runtime exception instead of exception
Browse files Browse the repository at this point in the history
  • Loading branch information
Smudgge committed Nov 19, 2023
1 parent 768c261 commit 8e44a87
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion dependency-reduced-pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.github.kerbity</groupId>
<artifactId>Kerb</artifactId>
<version>1.1.0</version>
<version>1.2.0</version>
<build>
<plugins>
<plugin>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

<groupId>com.github.kerbity</groupId>
<artifactId>Kerb</artifactId>
<version>1.1.0</version>
<version>1.2.0</version>

<properties>
<maven.compiler.source>21</maven.compiler.source>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,16 +197,16 @@ public CompletableResultSet(int size) {
* @throws Exception If the result size is already equal or over the complete size.
* If the results have already been completed.
*/
public @NotNull CompletableResultSet<T> addResult(@Nullable T result) throws Exception {
public @NotNull CompletableResultSet<T> addResult(@Nullable T result) {

// Check if the size is already maxed.
if (this.result.size() >= this.size) {
throw new Exception("Completable result collection is already full.");
throw new RuntimeException("Completable result collection is already full.");
}

// Check if it has already been completed.
if (this.isComplete) {
throw new Exception("Completable result collection has already been completed.");
throw new RuntimeException("Completable result collection has already been completed.");
}

// Add the result.
Expand Down

0 comments on commit 8e44a87

Please sign in to comment.