Skip to content

Log error strings in the error/status checking macros#278

Merged
jeffdonahue merged 6 commits intoBVLC:devfrom
kloudkl:log_error_string_in_check_macro
Apr 2, 2014
Merged

Log error strings in the error/status checking macros#278
jeffdonahue merged 6 commits intoBVLC:devfrom
kloudkl:log_error_string_in_check_macro

Conversation

@kloudkl
Copy link
Contributor

@kloudkl kloudkl commented Mar 31, 2014

Error strings are much more meaningful for debugging than the raw enum values.

Copy link
Contributor

Choose a reason for hiding this comment

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

Why the do { ... } while (0)? Wouldn't just { ... } work?

Copy link
Member

Choose a reason for hiding this comment

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

do/whiles in C++ macros are an ugly corner of the language.

Copy link
Contributor

Choose a reason for hiding this comment

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

ah, how annoying. Thanks for the explanation.

@jeffdonahue
Copy link
Contributor

Thanks @kloudkl! Please rebase and we can merge.

@kloudkl
Copy link
Contributor Author

kloudkl commented Apr 1, 2014

Rebased.

jeffdonahue added a commit that referenced this pull request Apr 2, 2014
Log error strings in the error/status checking macros
@jeffdonahue jeffdonahue merged commit 531ac6a into BVLC:dev Apr 2, 2014
@kloudkl kloudkl deleted the log_error_string_in_check_macro branch April 4, 2014 10:18
mitmul pushed a commit to mitmul/caffe that referenced this pull request Sep 30, 2014
Log error strings in the error/status checking macros
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

Comments