Skip to content

Commit f2a553b

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

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

rclrs/src/node/graph.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -493,8 +493,7 @@ mod tests {
493493
// Test that the graph has no publishers
494494
let names_and_topics = node
495495
.get_publisher_names_and_types_by_node(node_name, "")
496-
.unwrap();
497-
496+
.unwrap_or_else(|error| panic!("Failed to get publisher names and types: {}", error));
498497
assert_eq!(names_and_topics.len(), 0);
499498

500499
let num_publishers = node.count_publishers("/test").unwrap();

0 commit comments

Comments
 (0)