Skip to content

Commit 1e1952c

Browse files
Enhance Derived Cursor Rules with Additional Validation Guidelines
This commit updates the derived-cursor-rules.mdc file to include a new guideline for handling division by zero in the SemanticQuantity class. The existing frequency validation rule is retained for clarity. These additions aim to improve error handling and ensure robust validation within the codebase.
1 parent a9e6301 commit 1e1952c

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

.cursor/rules/derived-cursor-rules.mdc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,4 +247,5 @@ When adding XML documentation comments:
247247
* **Path Length Limits:** When testing path lengths, use a limit that works on all systems. A length of 259 characters is safe for Windows and other systems.
248248
* **SemanticQuantity Null Handling:** SemanticQuantity operations must throw `ArgumentNullException` when null arguments are passed into static methods.
249249
* **Temperature Validation:** Temperature values cannot be below absolute zero (0 K). Throw an `ArgumentException` if this condition is violated.
250-
* **Frequency Validation:** Frequency values cannot be negative. Throw an `ArgumentException` if this condition is violated.
250+
* **Frequency Validation:** Frequency values cannot be negative. Throw an `ArgumentException` if this condition is violated.
251+
* **Divide by Zero Exception**: When dividing `SemanticQuantity` by zero, a `DivideByZeroException` must be thrown. This applies specifically to the `DivideToStorage` method when dividing two quantities of the same type.

0 commit comments

Comments
 (0)