Skip to content

Conversation

@jb-balaji
Copy link

Refactor error handling in multiple source files to improve logging and consistency

@jb-balaji jb-balaji requested a review from Copilot November 19, 2025 14:55
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 const qualifiers
  • Replaced std::cout with slog::err for 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 <[email protected]>
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.

2 participants