Skip to content

Commit 02539ff

Browse files
author
GueLaKais
committed
tryage to make error handling cleaner
1 parent 552e2d4 commit 02539ff

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

rclrs/src/node/graph.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -484,6 +484,10 @@ mod tests {
484484
.and_then(|val| val.parse::<usize>().map_err(|e| format!("{}", e)))
485485
.map(|id| if id != 99 { 99 } else { 98 })
486486
.expect("Error setting domain_id");
487+
let context: Context =
488+
Context::new_with_options([], InitOptions::new().with_domain_id(Some(domain_id)))
489+
.unwrap_or_else(|error| panic!("Failed to create context: {}", error));
490+
487491
let node_name = "test_publisher_names_and_types";
488492
let node = Node::new(&context, node_name).unwrap();
489493
// Test that the graph has no publishers

0 commit comments

Comments
 (0)