Show / Hide Table of Contents

    Class ExceptionSpecification.Union

    An exception specification that is the union of a sequence of other exception specifications: the union can throw an exception iff said exception is throwable by any of the operands.

    Inheritance
    System.Object
    ExceptionSpecification
    ExceptionSpecification.Union
    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 Union : 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

    Operands

    Gets the list of exception specifications to which the union operator is applied.

    Declaration
    public IReadOnlyList<ExceptionSpecification> Operands { get; }
    Property Value
    Type Description
    System.Collections.Generic.IReadOnlyList<ExceptionSpecification>

    A list of exception specifications.

    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(ExceptionSpecification[])

    Takes the union of a sequence of exception specifications. The union can throw an exception iff said exception is throwable by any of the operands.

    Declaration
    public static ExceptionSpecification.Union Create(params ExceptionSpecification[] operands)
    Parameters
    Type Name Description
    ExceptionSpecification[] operands

    The exception specifications to which the union operator is applied.

    Returns
    Type Description
    ExceptionSpecification.Union

    A union exception specification.

    • Improve this Doc
    • View Source
    Back to top Generated by DocFX