fn load_config(config_path: &ConfigFilePath, config_path_default: bool) -> ConductorConfig {
    match ConductorConfig::load_yaml(config_path.as_ref()) {
        Err(ConductorConfigError::ConfigMissing(_)) => {
            display_friendly_missing_config_message(config_path, config_path_default);
            std::process::exit(ERROR_CODE);
        }
        Err(ConductorConfigError::SerializationError(err)) => {
            display_friendly_malformed_config_message(config_path, err);
            std::process::exit(ERROR_CODE);
        }
        result => result.expect("Could not load conductor config"),
    }
}
/// Load config, throw friendly error on failure
Load config, throw friendly error on failure
Load config throw friendly error on failure
fn load_config(config_path: &ConfigFilePath, config_path_default: bool) -> ConductorConfig {
    match ConductorConfig::load_yaml(config_path.as_ref()) {
        Err(ConductorConfigError::ConfigMissing(_)) => {
            display_friendly_missing_config_message(config_path, config_path_default);
            std::process::exit(ERROR_CODE);
        }
        Err(ConductorConfigError::SerializationError(err)) => {
            display_friendly_malformed_config_message(config_path, err);
            std::process::exit(ERROR_CODE);
        }
        result => result.expect("Could not load conductor config"),
    }
}
fn load_config ( config_path : & ConfigFilePath , config_path_default : bool ) -> ConductorConfig { match ConductorConfig :: load_yaml ( config_path . as_ref ( ) ) { Err ( ConductorConfigError :: ConfigMissing ( _ ) ) => { display_friendly_missing_config_message ( config_path , config_path_default ) ; std :: process :: exit ( ERROR_CODE ) ; } Err ( ConductorConfigError :: SerializationError ( err ) ) => { display_friendly_malformed_config_message ( config_path , err ) ; std :: process :: exit ( ERROR_CODE ) ; } result => result . expect ( " " ) , } }
Load config, throw friendly error on failure
Load config throw friendly error on failure
config_path
&ConfigFilePath
config_path_default
bool
config_path
&ConfigFilePath
config_path_default
bool