Skip to content

Move exceptions to their own folder#225

Merged
tudddorrr merged 2 commits into
developfrom
move-exceptions
Jul 4, 2026
Merged

Move exceptions to their own folder#225
tudddorrr merged 2 commits into
developfrom
move-exceptions

Conversation

@tudddorrr

@tudddorrr tudddorrr commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Exception infrastructure reorganisation

  • Five exception classes (ContinuityReplayException, IdentifyException, PlayerAuthException, RequestException, SocketException) moved from Runtime/Utils/ into a dedicated Runtime/Exceptions/ directory, establishing a single, discoverable home for all custom exception types

Safer error-code parsing on PlayerAuthException and SocketException

  • ErrorCode changed from a lazily-computed method (which parsed Message on every access) to a property set eagerly in the constructor, ensuring the code is captured once and is available even if the exception is rethrown or its message altered
  • Enum.Parse replaced with Enum.TryParse so that unrecognised or malformed error-code strings gracefully fall back to API_ERROR instead of throwing a System.ArgumentException at the caller

Minor hardening on ContinuityReplayException

  • The internal _exceptions list field marked readonly, signalling immutability after construction and matching standard C# convention

@tudddorrr
tudddorrr merged commit 0a28956 into develop Jul 4, 2026
3 checks passed
@tudddorrr
tudddorrr deleted the move-exceptions branch July 4, 2026 13:20
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