Skip to content

Changes to handling test passing and exceptions#83

Open
PandaMagnus wants to merge 2 commits intomainfrom
mc/expose-failures
Open

Changes to handling test passing and exceptions#83
PandaMagnus wants to merge 2 commits intomainfrom
mc/expose-failures

Conversation

@PandaMagnus
Copy link
Copy Markdown
Collaborator

@PandaMagnus PandaMagnus commented Mar 27, 2026

Description

  • Immediately mark the test as passed if no test blocks throw an exception
  • Expose the TestBlockException get and FinallyBlockExceptions so blocks can act based off of the caught exceptions

Ensure that your pull request has followed all the steps below:

  • Code compilation
  • Created tests which fail without the change (if possible)
  • All tests passing
  • Extended the README / documentation, if necessary

/// <remarks>This collection contains all exceptions that occurred in finally blocks, allowing
/// callers to inspect or handle them after execution. The list is empty if no exceptions were thrown in any
/// finally block.</remarks>
public List<Exception> FinallyBlockExceptions { get; } = [];
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the public surface be exposed as a readonly list/collection?

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.

2 participants