forked from Azure/azure-kusto-rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove use of anyhow and replace with thiserror, other markups (#7)
* Use thiserror * use scopes over explicit use of drop * update syntax * remove std::fmt::Debug * qualify thiserror
- Loading branch information
1 parent
6145aad
commit f0dddce
Showing
10 changed files
with
238 additions
and
92 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
//! Defines [Error] for representing failures in various operations. | ||
/// Error type for kusto ingestion operations. | ||
#[derive(thiserror::Error, Debug)] | ||
pub enum Error { | ||
/// Error raised when failing to obtain ingestion resources. | ||
#[error("Error obtaining ingestion resources: {0}")] | ||
ResourceManagerError(#[from] super::resource_manager::ResourceManagerError), | ||
|
||
/// Error relating to (de-)serialization of JSON data | ||
#[error("Error in JSON serialization/deserialization: {0}")] | ||
JsonError(#[from] serde_json::Error), | ||
|
||
/// Error occurring within core azure crates | ||
#[error("Error in azure-core: {0}")] | ||
AzureError(#[from] azure_core::error::Error), | ||
} | ||
|
||
/// Result type for kusto ingest operations. | ||
pub type Result<T> = std::result::Result<T, Error>; |
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
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.