Skip to content

refactor(Exception): improved the exception hierarchy and definitions.#20

Merged
ishamisu merged 2 commits into
mainfrom
heamings/dev/tch-parser-generalize-exception
May 22, 2026
Merged

refactor(Exception): improved the exception hierarchy and definitions.#20
ishamisu merged 2 commits into
mainfrom
heamings/dev/tch-parser-generalize-exception

Conversation

@ishamisu
Copy link
Copy Markdown
Contributor

@ishamisu ishamisu commented May 20, 2026

Background
This update is part of the process to refactor the parser, moving from tsn-config-parser to a separation between common and domain-specific components. Exception has been identified as one of the necessary changes to finalize this separation.

Enhanced Exception Definition & Structure
Exception

|_ TCHConfigError (base for all TCH errors)
    |_ CommonConfigError (base for shared/common configuration concerns)
        |_ ConfigParseError (configuration file parsing failures)
        |_ ValidationError (configuration validation failures)
    |_ TSNConfigError (base for TSN domain errors)
        |_ TCCommandError (traffic control command execution failures)
        |_ InterfaceError (network interface operation failures)
    |_ TCCConfigError (base for TCC domain errors)
    |_ ServiceError (service management errors)

Changes

  • Enhanced exception structure with both shared and domain specific errors.
  • Modified the config parser service to utilize a common parsing error.
  • Updated TCC and TSN to match the new exception definition.

Verification Result: ALL PASSED
ETHTSN-222 Enhanced Exceptions Test Result.txt

 - Enhanced exception structure with both shared and domain specific errors.
 - Modified the config parser service to utilize a common parsing error.
 - Updated TCC and TSN to match the new exception definition.
@ishamisu ishamisu self-assigned this May 20, 2026
@ishamisu ishamisu added the enhancement New feature or request label May 20, 2026
Copy link
Copy Markdown
Contributor

@engkeong-sve engkeong-sve left a comment

Choose a reason for hiding this comment

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

LGTM except the echo of error message

Comment thread src/time_config_hub/tcc_service.py Outdated
Copy link
Copy Markdown
Contributor

@liowsj liowsj left a comment

Choose a reason for hiding this comment

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

LGTM

@ishamisu ishamisu requested review from engkeong-sve and liowsj May 22, 2026 05:16
Copy link
Copy Markdown
Contributor

@engkeong-sve engkeong-sve left a comment

Choose a reason for hiding this comment

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

LGTM

@ishamisu ishamisu changed the base branch from heamings/dev/refactor-config-parser to main May 22, 2026 05:25
@ishamisu ishamisu merged commit 69d7e75 into main May 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants