3.0 KiB
3.0 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | |
|---|---|---|---|---|---|
|
2026-04-17T16:38:13.290924+00:00 | zai-org/GLM-5-FP8 | 1 | e17739ecd0d7bb21 |
Documentation: OutOfDataException
1. Purpose
OutOfDataException is a custom exception class within the DTS.Common.Exceptions namespace, designed to signal that a data-consuming operation has exhausted its available data. It extends the standard System.Exception class and adds an Index property to capture the position at which the out-of-data condition occurred, enabling more precise debugging and error reporting during data parsing, streaming, or iteration operations.
2. Public Interface
Class: OutOfDataException
Inherits from: System.Exception
Namespace: DTS.Common.Exceptions
Constructor
public OutOfDataException(string ex, long index)
Creates a new instance of OutOfDataException with the specified message and index position.
| Parameter | Type | Description |
|---|---|---|
ex |
string |
The exception message passed to the base Exception class |
index |
long |
The position/index at which the out-of-data condition occurred |
Properties
public long Index { get; private set; }
A read-only property that stores the index position where the exception was raised. Set only at construction time via the constructor.
3. Invariants
- Index Immutability: Once set during construction, the
Indexproperty cannot be modified externally (private setter). - Index Requirement: Every
OutOfDataExceptioninstance must have anIndexvalue; there is no parameterless constructor or constructor overload that omits the index. - Inheritance Contract: All standard
System.Exceptionbehaviors and invariants apply (e.g., serializability, stack trace capture).
4. Dependencies
This module depends on:
System(specificallySystem.Exceptionas the base class)
What depends on this module:
- Cannot be determined from this source file alone. Consumers would typically be data parsing, streaming, or collection iteration components within the
DTS.CommonCorelibrary or dependent projects.
5. Gotchas
- Misleading Parameter Name: The constructor parameter
exsuggests it might accept an exception object, but it actually expects astringmessage. A more conventional name would bemessageormsg. - No Standard Exception Constructors: Unlike typical custom exceptions, this class does not provide:
- A parameterless constructor
- A constructor accepting only a message
- A constructor for serialization (
SerializationInfo, StreamingContext) - A constructor accepting an inner exception
- Serialization Concern: The exception is not explicitly marked as
[Serializable]and lacks the standard deserialization constructor, which may cause issues in scenarios requiring exception serialization (e.g., across AppDomain boundaries or in distributed systems).