-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Support UnrecoverableException * Add UT and IT --------- (cherry picked from commit 4f58bc8) Signed-off-by: Louis Chu <[email protected]> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
- Loading branch information
1 parent
a92f7f6
commit ab7bfee
Showing
8 changed files
with
396 additions
and
88 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
flint-commons/src/main/scala/org/apache/spark/sql/exception/UnrecoverableException.scala
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,25 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package org.apache.spark.sql.exception | ||
|
||
/** | ||
* Represents an unrecoverable exception in session management and statement execution. This | ||
* exception is used for errors that cannot be handled or recovered from. | ||
*/ | ||
class UnrecoverableException private (message: String, cause: Throwable) | ||
extends RuntimeException(message, cause) { | ||
|
||
def this(cause: Throwable) = | ||
this(cause.getMessage, cause) | ||
} | ||
|
||
object UnrecoverableException { | ||
def apply(cause: Throwable): UnrecoverableException = | ||
new UnrecoverableException(cause) | ||
|
||
def apply(message: String, cause: Throwable): UnrecoverableException = | ||
new UnrecoverableException(message, cause) | ||
} |
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
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
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
Oops, something went wrong.