File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed
components/clarinet-deployments/src Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -472,8 +472,19 @@ pub async fn generate_default_deployment(
472472 let mut contract_location = base_location. clone ( ) ;
473473 contract_location
474474 . append_path ( & contract_config. expect_contract_path_as_str ( ) )
475- . unwrap ( ) ;
476- let source = contract_location. read_content_as_utf8 ( ) . unwrap ( ) ;
475+ . map_err ( |_| {
476+ format ! (
477+ "unable to build path for contract {}" ,
478+ contract_config. expect_contract_path_as_str( )
479+ )
480+ } ) ?;
481+
482+ let source = contract_location. read_content_as_utf8 ( ) . map_err ( |_| {
483+ format ! (
484+ "unable to find contract at path {}" ,
485+ contract_config. expect_contract_path_as_str( )
486+ )
487+ } ) ?;
477488 sources. insert ( contract_location. to_string ( ) , source) ;
478489 }
479490 sources
You can’t perform that action at this time.
0 commit comments