Skip to content

Add assertions to critical classes#2

Merged
JoshLohh merged 1 commit intomasterfrom
branch-A-Assertions
Sep 17, 2025
Merged

Add assertions to critical classes#2
JoshLohh merged 1 commit intomasterfrom
branch-A-Assertions

Conversation

@JoshLohh
Copy link
Copy Markdown
Owner

These classes do not have assertion checks.

Without such checks, programmer errors that violate hidden assumptions may go unnoticed during development, potentially leading to subtle bugs.

Add assertion statements to key constructors and logic points to ensure that critical internal assumptions always hold, such as non-null fields, object type consistency, and task list size/count invariants.

Assertions are used together with exceptions to cover all bases: Assertions for programmer errors, and exceptions for user errors. This will improve code robustness.

These classes do not have assertion checks.

Without such checks, programmer errors that violate hidden assumptions
may go unnoticed during development, potentially leading to subtle bugs.

Add assertion statements to key constructors and logic points to ensure
that critical internal assumptions always hold, such as non-null fields,
object type consistency, and task list size/count invariants.

Assertions are used together with exceptions to cover all bases:
Assertions for programmer errors, and exceptions for user
errors. This will improve code robustness.
@JoshLohh JoshLohh merged commit 288d165 into master Sep 17, 2025
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