mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 00:44:57 +02:00
add move, recursive fill, and recursive create procedures
This commit is contained in:
@ -83,10 +83,18 @@ pub enum ShellError {
|
||||
#[diagnostic(code(nu::shell::file_not_found), url(docsrs))]
|
||||
FileNotFound(#[label("file not found")] Span),
|
||||
|
||||
#[error("File not found")]
|
||||
#[diagnostic(code(nu::shell::file_not_found), url(docsrs))]
|
||||
FileNotFoundCustom(String, #[label("{0}")] Span),
|
||||
|
||||
#[error("Directory not found")]
|
||||
#[diagnostic(code(nu::shell::directory_not_found), url(docsrs))]
|
||||
DirectoryNotFound(#[label("directory not found")] Span),
|
||||
|
||||
#[error("File not found")]
|
||||
#[diagnostic(code(nu::shell::file_not_found), url(docsrs))]
|
||||
DirectoryNotFoundCustom(String, #[label("{0}")] Span),
|
||||
|
||||
#[error("Move not possible")]
|
||||
#[diagnostic(code(nu::shell::move_not_possible), url(docsrs))]
|
||||
MoveNotPossible {
|
||||
@ -109,6 +117,12 @@ impl From<std::io::Error> for ShellError {
|
||||
}
|
||||
}
|
||||
|
||||
impl std::convert::From<Box<dyn std::error::Error>> for ShellError {
|
||||
fn from(input: Box<dyn std::error::Error>) -> ShellError {
|
||||
ShellError::InternalError(input.to_string())
|
||||
}
|
||||
}
|
||||
|
||||
impl From<Box<dyn std::error::Error + Send + Sync>> for ShellError {
|
||||
fn from(input: Box<dyn std::error::Error + Send + Sync>) -> ShellError {
|
||||
ShellError::InternalError(format!("{:?}", input))
|
||||
|
Reference in New Issue
Block a user