Files
2026-04-17 14:55:32 -04:00

2.1 KiB

source_files, generated_at, model, schema_version, sha256
source_files generated_at model schema_version sha256
Common/DTS.Common/Classes/Connection/NotConnectedException.cs
2026-04-16T03:14:45.601567+00:00 Qwen/Qwen3-Coder-Next-FP8 1 e5ae1dc6ac386b41

Connection

  1. Purpose
    This module defines a custom exception type, NotConnectedException, used to signal operations that are attempted on a connection object when no active connection exists. It serves as a domain-specific error mechanism within the DTS.Common library to distinguish connection-state errors from generic application failures, enabling callers to handle disconnection scenarios explicitly.

  2. Public Interface

  • NotConnectedException(string message)
    Constructor that initializes a new instance of the exception with a specified error message. Inherits from ApplicationException. No additional properties or methods are defined beyond those inherited from Exception.
  1. Invariants
  • The exception must always be instantiated with a non-null message parameter (enforced by the base ApplicationException constructor).
  • It is a terminal exception type—no subclasses or derived types are defined in the provided source.
  • No state beyond the exception message (inherited from Exception.Message) is stored or managed.
  1. Dependencies
  • Depends on: System namespace (specifically System.ApplicationException).
  • Used by: Other modules in the DTS.Common namespace (and potentially downstream projects) that manage connection lifecycles and need to throw or catch connection-state errors.
  • No external project or library dependencies beyond the .NET Framework base class library.
  1. Gotchas
  • The class inherits from ApplicationException, which is generally discouraged in modern .NET development in favor of Exception or more specific base types; this may reflect legacy design.
  • No inner exception overload is provided—callers cannot wrap another exception as the cause.
  • No additional context (e.g., connection ID, endpoint) is captured; callers must embed such details in the message string.
  • None identified from source alone.