Skip to content

Commit

Permalink
Handle error correctly (#153)
Browse files Browse the repository at this point in the history
* Handle error correctly

* format

Co-authored-by: Thomas Lohse <49527735+t-lohse@users.noreply.github.com>
  • Loading branch information
Mati-AAU and t-lohse authored Nov 28, 2022
1 parent 24d3541 commit 52e788d
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/ProtobufServer/ecdar_requests/send_query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -194,12 +194,10 @@ fn convert_ecdar_result(query_result: &QueryResult) -> Option<ProtobufResult> {
component_paths,
}))
}
Err(e) => Some(ProtobufResult::Reachability(ReachabilityResult {
success: false,
reason: format!("Internal error occurred during reachability check: {}", e),
state: None,
component_paths: vec![],
})),
Err(e) => Some(ProtobufResult::Error(format!(
"Internal error occurred during reachability check: {}",
e
))),
}
}

Expand Down

0 comments on commit 52e788d

Please sign in to comment.