Removed redundant errors
This commit is contained in:
parent
431852f1e0
commit
a0b89d5acf
2 changed files with 0 additions and 32 deletions
|
@ -48,14 +48,6 @@ impl From<PError> for IronError {
|
||||||
PError::PathNotInVfs => IronError::new(err, status::NotFound),
|
PError::PathNotInVfs => IronError::new(err, status::NotFound),
|
||||||
PError::CannotServeDirectory => IronError::new(err, status::BadRequest),
|
PError::CannotServeDirectory => IronError::new(err, status::BadRequest),
|
||||||
PError::UnsupportedFileType => IronError::new(err, status::BadRequest),
|
PError::UnsupportedFileType => IronError::new(err, status::BadRequest),
|
||||||
PError::ConfigFileOpenError => IronError::new(err, status::InternalServerError),
|
|
||||||
PError::ConfigFileReadError => IronError::new(err, status::InternalServerError),
|
|
||||||
PError::ConfigFileParseError => IronError::new(err, status::InternalServerError),
|
|
||||||
PError::ConfigMountDirsParseError => IronError::new(err, status::InternalServerError),
|
|
||||||
PError::ConfigUsersParseError => IronError::new(err, status::InternalServerError),
|
|
||||||
PError::ConfigAlbumArtPatternParseError => {
|
|
||||||
IronError::new(err, status::InternalServerError)
|
|
||||||
}
|
|
||||||
PError::AlbumArtSearchError => IronError::new(err, status::InternalServerError),
|
PError::AlbumArtSearchError => IronError::new(err, status::InternalServerError),
|
||||||
PError::ImageProcessingError => IronError::new(err, status::InternalServerError),
|
PError::ImageProcessingError => IronError::new(err, status::InternalServerError),
|
||||||
PError::UnsupportedMetadataFormat => IronError::new(err, status::InternalServerError),
|
PError::UnsupportedMetadataFormat => IronError::new(err, status::InternalServerError),
|
||||||
|
|
24
src/error.rs
24
src/error.rs
|
@ -17,12 +17,6 @@ pub enum PError {
|
||||||
PathNotInVfs,
|
PathNotInVfs,
|
||||||
CannotServeDirectory,
|
CannotServeDirectory,
|
||||||
UnsupportedFileType,
|
UnsupportedFileType,
|
||||||
ConfigFileOpenError,
|
|
||||||
ConfigFileReadError,
|
|
||||||
ConfigFileParseError,
|
|
||||||
ConfigMountDirsParseError,
|
|
||||||
ConfigUsersParseError,
|
|
||||||
ConfigAlbumArtPatternParseError,
|
|
||||||
AlbumArtSearchError,
|
AlbumArtSearchError,
|
||||||
ImageProcessingError,
|
ImageProcessingError,
|
||||||
UnsupportedMetadataFormat,
|
UnsupportedMetadataFormat,
|
||||||
|
@ -78,14 +72,6 @@ impl error::Error for PError {
|
||||||
PError::PathNotInVfs => "Requested path does not index a mount point",
|
PError::PathNotInVfs => "Requested path does not index a mount point",
|
||||||
PError::CannotServeDirectory => "Only individual files can be served",
|
PError::CannotServeDirectory => "Only individual files can be served",
|
||||||
PError::UnsupportedFileType => "Unrecognized extension",
|
PError::UnsupportedFileType => "Unrecognized extension",
|
||||||
PError::ConfigFileOpenError => "Could not open config file",
|
|
||||||
PError::ConfigFileReadError => "Could not read config file",
|
|
||||||
PError::ConfigFileParseError => "Could not parse config file",
|
|
||||||
PError::ConfigMountDirsParseError => "Could not parse mount directories in config file",
|
|
||||||
PError::ConfigUsersParseError => "Could not parse users in config file",
|
|
||||||
PError::ConfigAlbumArtPatternParseError => {
|
|
||||||
"Could not parse album art pattern in config file"
|
|
||||||
}
|
|
||||||
PError::AlbumArtSearchError => "Error while looking for album art",
|
PError::AlbumArtSearchError => "Error while looking for album art",
|
||||||
PError::ImageProcessingError => "Error while processing image",
|
PError::ImageProcessingError => "Error while processing image",
|
||||||
PError::UnsupportedMetadataFormat => "Unsupported metadata format",
|
PError::UnsupportedMetadataFormat => "Unsupported metadata format",
|
||||||
|
@ -114,16 +100,6 @@ impl fmt::Display for PError {
|
||||||
PError::PathNotInVfs => write!(f, "Requested path does not index a mount point"),
|
PError::PathNotInVfs => write!(f, "Requested path does not index a mount point"),
|
||||||
PError::CannotServeDirectory => write!(f, "Only individual files can be served"),
|
PError::CannotServeDirectory => write!(f, "Only individual files can be served"),
|
||||||
PError::UnsupportedFileType => write!(f, "Unrecognized extension"),
|
PError::UnsupportedFileType => write!(f, "Unrecognized extension"),
|
||||||
PError::ConfigFileOpenError => write!(f, "Could not open config file"),
|
|
||||||
PError::ConfigFileReadError => write!(f, "Could not read config file"),
|
|
||||||
PError::ConfigFileParseError => write!(f, "Could not parse config file"),
|
|
||||||
PError::ConfigUsersParseError => write!(f, "Could not parse users in config file"),
|
|
||||||
PError::ConfigMountDirsParseError => {
|
|
||||||
write!(f, "Could not parse mount directories in config file")
|
|
||||||
}
|
|
||||||
PError::ConfigAlbumArtPatternParseError => {
|
|
||||||
write!(f, "Could not album art pattern in config file")
|
|
||||||
}
|
|
||||||
PError::AlbumArtSearchError => write!(f, "Error while looking for album art"),
|
PError::AlbumArtSearchError => write!(f, "Error while looking for album art"),
|
||||||
PError::ImageProcessingError => write!(f, "Error while processing image"),
|
PError::ImageProcessingError => write!(f, "Error while processing image"),
|
||||||
PError::UnsupportedMetadataFormat => write!(f, "Unsupported metadata format"),
|
PError::UnsupportedMetadataFormat => write!(f, "Unsupported metadata format"),
|
||||||
|
|
Loading…
Add table
Reference in a new issue