-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into tool-step-config
Signed-off-by: Daniel Widdis <[email protected]>
- Loading branch information
Showing
15 changed files
with
667 additions
and
31 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
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
48 changes: 48 additions & 0 deletions
48
src/main/java/org/opensearch/flowframework/exception/ApiSpecParseException.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,48 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* The OpenSearch Contributors require contributions made to | ||
* this file be licensed under the Apache-2.0 license or a | ||
* compatible open source license. | ||
*/ | ||
package org.opensearch.flowframework.exception; | ||
|
||
import org.opensearch.OpenSearchException; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* Custom exception to be thrown when an error occurs during the parsing of an API specification. | ||
*/ | ||
public class ApiSpecParseException extends OpenSearchException { | ||
|
||
/** | ||
* Constructor with message. | ||
* | ||
* @param message The detail message. | ||
*/ | ||
public ApiSpecParseException(String message) { | ||
super(message); | ||
} | ||
|
||
/** | ||
* Constructor with message and cause. | ||
* | ||
* @param message The detail message. | ||
* @param cause The cause of the exception. | ||
*/ | ||
public ApiSpecParseException(String message, Throwable cause) { | ||
super(message, cause); | ||
} | ||
|
||
/** | ||
* Constructor with message and list of detailed errors. | ||
* | ||
* @param message The detail message. | ||
* @param details The list of errors encountered during the parsing process. | ||
*/ | ||
public ApiSpecParseException(String message, List<String> details) { | ||
super(message + ": " + String.join(", ", details)); | ||
} | ||
} |
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.