# ExceptionExtensionMethods class

Namespace: [Grasshopper2.Extensions](https://developer.rhino3d.com/api/gh2/namespace/grasshopper2.extensions.md) · Assembly: [Grasshopper2](https://developer.rhino3d.com/api/gh2/assembly/grasshopper2.md)

```cs
public static class ExceptionExtensionMethods
```

Provides some extension methods for various types of exception.

## Methods

- [Contains<T>](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.exceptionextensionmethods/contains.md): (2 overloads, static) Test whether an aggregate exception contains an exception of the specified type.
- [ExtractRhinoVersion](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.exceptionextensionmethods/extractrhinoversion.md): (static) Try and extract the Rhino main version and service release indicated by the exception entry point.
- [IsCancellationException](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.exceptionextensionmethods/iscancellationexception.md): (static) Tests whether an exception represents a cancellation. If the exception is a [TaskCanceledException](https://learn.microsoft.com/dotnet/api/system.threading.tasks.taskcanceledexception), [OperationCanceledException](https://learn.microsoft.com/dotnet/api/system.operationcanceledexception) or an [AggregateException](https://learn.microsoft.com/dotnet/api/system.aggregateexception) containing any of the above exceptions, the exception as a whole is considered to be a cancelling exception rather than a faulting exception.
