Class ExceptionSpecification.Exact
An exception specification that can throw an exception of exactly one type.
Inherited Members
Namespace: Flame
Assembly: Flame.dll
Syntax
public sealed class Exact : ExceptionSpecification
Properties
| Improve this Doc View SourceCanThrowSomething
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 |
|
Overrides
| Improve this Doc View SourceExceptionType
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 SourceCanThrow(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 |
|
Overrides
| Improve this Doc View SourceCreate(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 |