-
Notifications
You must be signed in to change notification settings - Fork 55
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
Add functions for C++ assertions #31
Conversation
Signed-off-by: Zachary Michaels <[email protected]>
70b0f17
to
4211b65
Compare
This LGTM, main concern is whether this works on windows. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM pending green CI
@ros2/aws-oncall @prajakta-gokhale @thomas-moulard - please run this CI job |
Signed-off-by: Zachary Michaels <[email protected]>
Signed-off-by: Zachary Michaels <[email protected]>
Signed-off-by: Zachary Michaels <[email protected]>
a35f0e3
to
e378655
Compare
Signed-off-by: Zachary Michaels <[email protected]>
A few changes, some from discussion with @wjwwood
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM on Green CI
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than a small comment, lgtm
Signed-off-by: Zachary Michaels <[email protected]>
Signed-off-by: Zachary Michaels <[email protected]>
Signed-off-by: Zachary Michaels <[email protected]>
a0c6d58
to
c3db1bc
Compare
Signed-off-by: Zachary Michaels <[email protected]>
f1f385c
to
daa06b8
Compare
Does this require CI to rerun for Linux/macOS? |
Better safe than sorry :) |
Changes
rcpputils::require_true(condition)
which throwsstd::invalid_argument
if condition is false. Its indended use is for parameter checks that should always be ran.rcpputils::check_true(condition)
which throwsrcpputils::InvalidStateException
if condition is false. Its intended use is for state checks that should always be ran.rcpputils::assert_true(condition)
which throwsrcpputils::AssertionException
if condition is false AND the macroNDEBUG
is not set. Its intended use is for additional checks inserted into debug builds.Issues