Skip to content

Conversation

@lsimonson-astranis
Copy link

No description provided.

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

This pull request enhances error reporting in the StationWatcher class within the OpenHTF framework by adding detailed traceback information to exception logs.

  • Modified openhtf/output/servers/station_server.py to include formatted exception details in the StationWatcher.run() method
  • Improved error visibility by using traceback.format_exception() for comprehensive stack traces
  • Enhanced debugging capabilities for issues occurring in the station watching process
  • Aligned with best practices for error handling and logging in Python applications

1 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings | Greptile

Comment on lines +185 to +187
formatted_exception = traceback.format_exception(
type(error), error, error.__traceback__)
_LOG.error('Error in station watcher: \n',
Copy link

Choose a reason for hiding this comment

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

style: Consider using f-strings for better readability

Suggested change
formatted_exception = traceback.format_exception(
type(error), error, error.__traceback__)
_LOG.error('Error in station watcher: \n',
formatted_exception = traceback.format_exception(
type(error), error, error.__traceback__)
_LOG.error(f'Error in station watcher: \n{''.join(formatted_exception)}')

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.

1 participant