-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
improve Error Handling on BlockNodeApp, webServer Start, added a new …
…UnhandledIOException that is a runtime wrapper for the checked IOException Signed-off-by: Alfredo Gutierrez <[email protected]>
- Loading branch information
1 parent
0ad8a3a
commit ae78e6d
Showing
2 changed files
with
27 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
server/src/main/java/com/hedera/block/server/exception/UnhandledIOException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package com.hedera.block.server.exception; | ||
|
||
import java.io.Serial; | ||
|
||
/** | ||
* UnhandledIOException is a RuntimeException that wraps an IOException. | ||
* This can be used to rethrow checked IOExceptions as unchecked exceptions. | ||
*/ | ||
public class UnhandledIOException extends RuntimeException { | ||
|
||
@Serial | ||
private static final long serialVersionUID = 1L; | ||
|
||
/** | ||
* Constructs a new UnhandledIOException with the specified cause. | ||
* | ||
* @param cause the underlying IOException that caused this exception | ||
*/ | ||
public UnhandledIOException(final Throwable cause) { | ||
super(cause); | ||
} | ||
} |