Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom error handler #375

Merged
merged 1 commit into from
Mar 17, 2014
Merged

Conversation

esteve
Copy link
Member

@esteve esteve commented Mar 10, 2014

This branch allows users to define a custom behavior for handling exceptions raised from within a service.

@wjwwood
Copy link
Member

wjwwood commented Mar 10, 2014

This looks ok to me. The default behavior shouldn't change and the other part has been tested against capabilities.

@wjwwood
Copy link
Member

wjwwood commented Mar 10, 2014

+1

@@ -540,7 +540,7 @@ class ServiceImpl(_Service):
Implementation of ROS Service. This intermediary class allows for more configuration of behavior than the Service class.
"""

def __init__(self, name, service_class, handler, buff_size=DEFAULT_BUFF_SIZE):
def __init__(self, name, service_class, handler, buff_size=DEFAULT_BUFF_SIZE, error_handler=None):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the new argument is anything but trivial it should get a description in the doc block. Or at least mention which other constructor it relates to (since it is documented there).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

He has some doc stuff in the Service class, I think this is slim on docs because it is the Impl class.

@dirk-thomas
Copy link
Member

Please address the one remaining comment and finally squash your commits.

@esteve
Copy link
Member Author

esteve commented Mar 17, 2014

@dirk-thomas done!

dirk-thomas added a commit that referenced this pull request Mar 17, 2014
@dirk-thomas dirk-thomas merged commit b9ed440 into ros:indigo-devel Mar 17, 2014
dirk-thomas added a commit that referenced this pull request Mar 18, 2014
@esteve esteve deleted the custom-error-handler branch March 20, 2014 17:15
dirk-thomas added a commit that referenced this pull request Mar 20, 2014
@dirk-thomas
Copy link
Member

Cherry-picked to hydro-devel.

dirk-thomas added a commit that referenced this pull request Mar 21, 2014
dirk-thomas added a commit that referenced this pull request Mar 21, 2014
rsinnet pushed a commit to MisoRobotics/ros_comm that referenced this pull request Jun 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants