@@ -258,7 +258,10 @@ impl ChiselDispatcher {
258
258
self . session. id. as_ref( ) . unwrap( )
259
259
) ) )
260
260
} else {
261
- DispatchResult :: CommandFailed ( Self :: make_error ( "Too many arguments supplied!" ) )
261
+ DispatchResult :: CommandFailed ( Self :: make_error ( format ! (
262
+ "Too many arguments supplied: [{}]. Please check command syntax." ,
263
+ args. join( ", " )
264
+ ) ) )
262
265
}
263
266
}
264
267
ChiselCommand :: Load => {
@@ -333,7 +336,9 @@ impl ChiselDispatcher {
333
336
self . session . id = None ;
334
337
DispatchResult :: CommandSuccess ( Some ( String :: from ( "Cleared chisel cache!" ) ) )
335
338
}
336
- Err ( _) => DispatchResult :: CommandFailed ( Self :: make_error ( "Failed to clear cache!" ) ) ,
339
+ Err ( _) => DispatchResult :: CommandFailed ( Self :: make_error (
340
+ "Failed to clear cache! Check file permissions or disk space." ,
341
+ ) ) ,
337
342
} ,
338
343
ChiselCommand :: Fork => {
339
344
if args. is_empty ( ) || args[ 0 ] . trim ( ) . is_empty ( ) {
@@ -371,7 +376,9 @@ impl ChiselDispatcher {
371
376
372
377
// Check validity of URL
373
378
if Url :: parse ( & fork_url) . is_err ( ) {
374
- return DispatchResult :: CommandFailed ( Self :: make_error ( "Invalid fork URL!" ) )
379
+ return DispatchResult :: CommandFailed ( Self :: make_error (
380
+ "Invalid fork URL! Please provide a valid RPC endpoint URL." ,
381
+ ) )
375
382
}
376
383
377
384
// Create success message before moving the fork_url
@@ -634,7 +641,9 @@ impl ChiselDispatcher {
634
641
}
635
642
ChiselCommand :: Exec => {
636
643
if args. is_empty ( ) {
637
- return DispatchResult :: CommandFailed ( Self :: make_error ( "No command supplied!" ) )
644
+ return DispatchResult :: CommandFailed ( Self :: make_error (
645
+ "No command supplied! Please provide a valid command after '!'." ,
646
+ ) )
638
647
}
639
648
640
649
let mut cmd = Command :: new ( args[ 0 ] ) ;
0 commit comments