Skip to content

Inconsistent Error Handling Return Types #8

Description

@LinuxMainframe

Medium: Inconsistent Error Handling Return Types

Priority: MEDIUM

Type: API Consistency

Issue

Public API functions use inconsistent return types for errors:

Functions returning obsws_error_t:

  • obsws_send_request()
  • obsws_set_current_scene()
  • obsws_get_current_scene()
  • Most API functions

Functions returning int:

  • obsws_ping() - returns latency (ms) or negative error code
  • obsws_process_events() - returns 0 or error code

Functions returning void:

  • obsws_config_init()
  • obsws_response_free()
  • obsws_cleanup()

Impact

  • API inconsistency confuses users
  • Mixing int and obsws_error_t makes error handling unclear
  • Users don't know which functions can fail

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    MEDIUMNot a risk, but definitely would improve functionality

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions