Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more output to errors #144

Merged
merged 1 commit into from
Nov 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 19 additions & 19 deletions rust/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,45 +5,45 @@ use thiserror::Error;

#[derive(Error, Debug)]
pub enum HdfsError {
#[error("IO error occurred while communicating with HDFS")]
#[error("IO error occurred while communicating with HDFS: {0}")]
IOError(#[from] io::Error),
#[error("data transfer error")]
#[error("data transfer error: {0}")]
DataTransferError(String),
#[error("checksums didn't match")]
ChecksumError,
#[error("invalid path")]
#[error("invalid path: {0}")]
InvalidPath(String),
#[error("invalid argument")]
#[error("invalid argument: {0}")]
InvalidArgument(String),
#[error("failed to parse URL")]
#[error("failed to parse URL: {0}")]
UrlParseError(#[from] url::ParseError),
#[error("file already exists")]
#[error("file already exists: {0}")]
AlreadyExists(String),
#[error("operation failed")]
#[error("operation failed: {0}")]
OperationFailed(String),
#[error("file not found")]
#[error("file not found: {0}")]
FileNotFound(String),
#[error("blocks not found")]
#[error("blocks not found for {0}")]
BlocksNotFound(String),
#[error("path is a directory")]
#[error("path is a directory: {0}")]
IsADirectoryError(String),
#[error("unsupported erasure coding policy")]
#[error("unsupported erasure coding policy {0}")]
UnsupportedErasureCodingPolicy(String),
#[error("erasure coding error")]
#[error("erasure coding error: {0}")]
ErasureCodingError(String),
#[error("operation not supported")]
#[error("operation not supported: {0}")]
UnsupportedFeature(String),
#[error("interal error, this shouldn't happen")]
#[error("interal error, this shouldn't happen: {0}")]
InternalError(String),
#[error("failed to decode RPC response")]
#[error("failed to decode RPC response: {0}")]
InvalidRPCResponse(#[from] DecodeError),
#[error("RPC error")]
#[error("RPC error: {0} {1}")]
RPCError(String, String),
#[error("fatal RPC error")]
#[error("fatal RPC error: {0} {1}")]
FatalRPCError(String, String),
#[error("SASL error")]
#[error("SASL error: {0}")]
SASLError(String),
#[error("GSSAPI error")]
#[error("GSSAPI error: {0:?} {1} {2}")]
GSSAPIError(crate::security::gssapi::GssMajorCodes, u32, String),
#[error("No valid SASL mechanism found")]
NoSASLMechanism,
Expand Down
Loading