Show / Hide Table of Contents

    Class ExceptionSpecification.Exact

    An exception specification that can throw an exception of exactly one type.

    Inheritance
    System.Object
    ExceptionSpecification
    ExceptionSpecification.Exact
    Inherited Members
    ExceptionSpecification.NoThrow
    ExceptionSpecification.ThrowAny
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Flame
    Assembly: Flame.dll
    Syntax
    public sealed class Exact : ExceptionSpecification

    Properties

    | Improve this Doc View Source

    CanThrowSomething

    Tells if this exception specification allows for any exceptions at all to be thrown.

    Declaration
    public override bool CanThrowSomething { get; }
    Property Value
    Type Description
    System.Boolean

    true if this exception specification allows for at least one type of exception to be thrown; otherwise, false.

    Overrides
    ExceptionSpecification.CanThrowSomething
    | Improve this Doc View Source

    ExceptionType

    Gets the type of exception that can be thrown by this exception specification.

    Declaration
    public IType ExceptionType { get; }
    Property Value
    Type Description
    IType

    The type of exception that can be thrown.

    Methods

    | Improve this Doc View Source

    CanThrow(IType)

    Tells if this exception specification allows for an exception of a particular type or a derived type to be thrown.

    Declaration
    public override bool CanThrow(IType exceptionType)
    Parameters
    Type Name Description
    IType exceptionType

    The type of exception to examine.

    Returns
    Type Description
    System.Boolean

    true if an exception of type exceptionType or a derived type can be thrown; otherwise, false.

    Overrides
    ExceptionSpecification.CanThrow(IType)
    | Improve this Doc View Source

    Create(IType)

    Creates an exception specification that can throw exactly one type of exception.

    Declaration
    public static ExceptionSpecification.Exact Create(IType exceptionType)
    Parameters
    Type Name Description
    IType exceptionType

    The single exception type that can be thrown.

    Returns
    Type Description
    ExceptionSpecification.Exact
    • Improve this Doc
    • View Source
    Back to top Generated by DocFX