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

Add error checking on SqliteWrapper deconstructor #169

Merged

Conversation

zmichaels11
Copy link
Contributor

Check the return code for sqlite3_close and log to error.

Signed-off-by: Zachary Michaels zmichaels11@gmail.com

Signed-off-by: Zachary Michaels <zmichaels11@gmail.com>
if (rc != SQLITE_OK) {
ROSBAG2_STORAGE_DEFAULT_PLUGINS_LOG_ERROR_STREAM(
"Could not close open database. Error code: " + std::to_string(rc) +
" Error message: " + sqlite3_errstr(rc));
Copy link
Contributor

Choose a reason for hiding this comment

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

Newline?

Copy link
Contributor

@piraka9011 piraka9011 left a comment

Choose a reason for hiding this comment

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

Good catch

Signed-off-by: Zachary Michaels <zmichaels11@gmail.com>
@zmichaels11 zmichaels11 force-pushed the sqlite-storage-check-error-on-close branch from 978565e to f11e3bb Compare October 4, 2019 17:05
Signed-off-by: Zachary Michaels <zmichaels11@gmail.com>
Copy link
Contributor

@thomas-moulard thomas-moulard left a comment

Choose a reason for hiding this comment

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

This LGTM

Copy link
Collaborator

@Karsten1987 Karsten1987 left a comment

Choose a reason for hiding this comment

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

lgtm with green CI:

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

Signed-off-by: Zachary Michaels <zmichaels11@gmail.com>
@zmichaels11 zmichaels11 force-pushed the sqlite-storage-check-error-on-close branch from 99538db to ade278b Compare October 7, 2019 17:08
@zmichaels11
Copy link
Contributor Author

Fixed the uncrustify issue on sqlite_wrapper.cpp

@Karsten1987
Copy link
Collaborator

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

@Karsten1987 Karsten1987 self-requested a review October 7, 2019 23:56
@Karsten1987
Copy link
Collaborator

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

Signed-off-by: Zachary Michaels <zmichaels11@gmail.com>
@zmichaels11 zmichaels11 force-pushed the sqlite-storage-check-error-on-close branch from f8c4375 to fe6ba56 Compare October 8, 2019 15:36
@Karsten1987
Copy link
Collaborator

one more round of linux:
Build Status

@Karsten1987 Karsten1987 merged commit ced66c6 into ros2:master Oct 8, 2019
@thomas-moulard thomas-moulard deleted the sqlite-storage-check-error-on-close branch October 8, 2019 20:25
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.

None yet

4 participants