Draft
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR refactors error handling across multiple source files to improve logging consistency and code maintainability. The changes standardize error message formatting, fix unreachable code issues, and consolidate return codes.
Key changes:
- Added descriptive prefixes to error messages for better context
- Removed unreachable code after throw statements
- Standardized exception handling patterns with proper
constqualifiers - Replaced
std::coutwithslog::errfor consistent logging
Reviewed Changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| sample/src/pipeline_with_params.cpp | Added "Pipeline error:" prefix to exception messages for clearer context |
| sample/src/parameters.cpp | Removed unreachable return statement, added error prefix, standardized return codes |
| sample/src/image_people_server.cpp | Replaced std::cout with slog::err, added const to exception catch, added missing return statements |
| sample/src/image_object_server.cpp | Replaced std::cout with slog::err, added const to exception catch, added missing return statements |
| openvino_wrapper_lib/src/inputs/realsense_camera.cpp | Removed unreachable return statement, added new exception handler with descriptive error messages |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…nd consistency Signed-off-by: Sathiyamoorthi, Jayabalaji <jayabalaji.sathiyamoorthi@intel.com>
9b02bb6 to
8d7a782
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refactor error handling in multiple source files to improve logging and consistency