Skip to content
Merged
Changes from 1 commit
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
10 changes: 5 additions & 5 deletions crates/chisel/src/dispatcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ impl ChiselDispatcher {
self.session.id.as_ref().unwrap()
)))
} else {
DispatchResult::CommandFailed(Self::make_error("Too many arguments supplied!"))
DispatchResult::CommandFailed(Self::make_error("Too many arguments supplied! Please check command syntax."))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think here it would be better to include all the arguments so the user can easily double check it

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mattsse Corrected. Thank you for looking this through

}
}
ChiselCommand::Load => {
Expand Down Expand Up @@ -301,7 +301,7 @@ impl ChiselDispatcher {
self.session.id.as_ref().unwrap()
)))
} else {
DispatchResult::CommandFailed(Self::make_error("Failed to load session!"))
DispatchResult::CommandFailed(Self::make_error("Failed to load session! The session ID may not exist or might be corrupted."))
}
}
ChiselCommand::ListSessions => match ChiselSession::list_sessions() {
Expand Down Expand Up @@ -333,7 +333,7 @@ impl ChiselDispatcher {
self.session.id = None;
DispatchResult::CommandSuccess(Some(String::from("Cleared chisel cache!")))
}
Err(_) => DispatchResult::CommandFailed(Self::make_error("Failed to clear cache!")),
Err(_) => DispatchResult::CommandFailed(Self::make_error("Failed to clear cache! Check file permissions or disk space.")),
},
ChiselCommand::Fork => {
if args.is_empty() || args[0].trim().is_empty() {
Expand Down Expand Up @@ -371,7 +371,7 @@ impl ChiselDispatcher {

// Check validity of URL
if Url::parse(&fork_url).is_err() {
return DispatchResult::CommandFailed(Self::make_error("Invalid fork URL!"))
return DispatchResult::CommandFailed(Self::make_error("Invalid fork URL! Please provide a valid RPC endpoint URL."))
}

// Create success message before moving the fork_url
Expand Down Expand Up @@ -634,7 +634,7 @@ impl ChiselDispatcher {
}
ChiselCommand::Exec => {
if args.is_empty() {
return DispatchResult::CommandFailed(Self::make_error("No command supplied!"))
return DispatchResult::CommandFailed(Self::make_error("No command supplied! Please provide a valid command after '!'."))
}

let mut cmd = Command::new(args[0]);
Expand Down
Loading