Search Results for

    Show / Hide Table of Contents

    Enum UnhandledExceptionHandling

    Flag to change how NUnit deals with exceptions unhandled by the test code.

    Namespace: NUnit.Framework
    Assembly: nunit.framework.dll
    Syntax
    public enum UnhandledExceptionHandling
    Remarks

    Note this only deals with exception raised on other threads than the main test thread. Exceptions on the main test thread will always cause the test to fail, even if this attribute is set to Ignore.

    Fields

    Name Description
    Default

    This value is provided for clarity and to explicitly indicate the default handling behavior.

    Error

    Unhandled exceptions will be treated as test errors. This is the default behavior matching what NUnit does if an exception is thrown in the test thread.

    Ignore

    Unhandled exceptions will be ignored and not cause the test to fail. This is not recommended, as it may hide issues in the test code or the system under test.

    • View Source
    In this article
    Back to top Generated by DocFX | Copyright (c) 2018- The NUnit Project - Licensed under CC BY-NC-SA 4.0