Skip to content
This repository has been archived by the owner on Dec 7, 2023. It is now read-only.

Commit

Permalink
+ output file value within error
Browse files Browse the repository at this point in the history
  • Loading branch information
simple0x47 committed Oct 8, 2023
1 parent 60fe9eb commit 50e0d9f
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/impl/init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,15 @@ pub async fn try_initialize_microservice<
fn get_amqp_connect_config(
amqp_connection_file: String,
) -> Result<AmqpConnectConfig, std::io::Error> {
let amqp_connection_file_content = match std::fs::read_to_string(amqp_connection_file) {
let amqp_connection_file_content = match std::fs::read_to_string(&amqp_connection_file) {
Ok(content) => content,
Err(error) => {
return Err(std::io::Error::new(
std::io::ErrorKind::NotFound,
format!("failed to find amqp connection file: {}", &error),
format!(
"failed to find amqp connection file '{}': {}",
&amqp_connection_file, &error
),
))
}
};
Expand All @@ -126,12 +129,15 @@ fn get_amqp_connect_config(
}

fn get_amqp_api<'a>(amqp_api_file: String) -> Result<Vec<AmqpApiEntry>, std::io::Error> {
let amqp_api_file_content = match std::fs::read_to_string(amqp_api_file) {
let amqp_api_file_content = match std::fs::read_to_string(&amqp_api_file) {
Ok(content) => content,
Err(error) => {
return Err(std::io::Error::new(
std::io::ErrorKind::NotFound,
format!("failed to find amqp api file: {}", &error),
format!(
"failed to find amqp api file '{}': {}",
&amqp_api_file, &error
),
))
}
};
Expand Down

0 comments on commit 50e0d9f

Please sign in to comment.