Skip to content

Commit

Permalink
[Spark][Kernel] Add isFatal detection to LogStoreErors (delta-io#3743)
Browse files Browse the repository at this point in the history
#### Which Delta project/connector is this regarding?
- [x] Spark
- [ ] Standalone
- [ ] Flink
- [x] Kernel
- [ ] Other (fill in here)

## Description

Simple PR that adds `isFatal` utility that can be used in
`delta-storage`

## How was this patch tested?

Build

## Does this PR introduce _any_ user-facing changes?

No
  • Loading branch information
sumeet-db authored Oct 1, 2024
1 parent 567d448 commit 19c054b
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,14 @@ public static boolean isNonFatal(Throwable t) {
return true;
}

/**
* Returns true if the provided Throwable is to be considered fatal, or false if it is to be
* considered non-fatal
*/
public static boolean isFatal(Throwable t) {
return !isNonFatal(t);
}

public static IOException incorrectLogStoreImplementationException(Throwable cause) {
return new IOException(
String.join("\n",
Expand Down

0 comments on commit 19c054b

Please sign in to comment.