question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Create custom exceptions in _rclpy.c

See original GitHub issue

For now every failure in rclpy raises a RuntimeError, we should create custom errors for different failure scenarios and avoid the tests of just catching random RuntimeErrors.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:4
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
suab321321commented, Dec 6, 2019

#478 here @jacobperron sir

0reactions
jacobperroncommented, Dec 6, 2019

I have to make RCLError first right?

Correct. You can declare and initialize it in the two places of the code I referenced (https://github.com/ros2/rclpy/issues/31#issuecomment-560948574).

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to create a custom Python exception type in C extension?
The easiest way to create a new exception type in C code is to call PyErr_NewException .
Read more >
Fail building rclpy from source - ROS Answers
I faced a problem that fail building rclpy from source. I followed a official guide in this repository, but falied building during colcon...
Read more >
How to Define Custom Exceptions in Python? (With Examples)
In Python, we can define custom exceptions by creating a new class that is derived from the built-in Exception class. Here's the syntax...
Read more >
Publishing ROS2 Custom Message from Omniverse
I then created an extension in Omniverse called my.custom.msgs ... The C extension '/opt/ros/foxy/lib/python3.8/site-packages/rclpy/_rclpy.
Read more >
How to Implement Custom Exceptions in C++ - Rollbar
Custom C++ Exceptions Example. Here's an example on how to create and throw a custom exception in C++: #include <iostream> ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found