BadScript 2
Loading...
Searching...
No Matches
ExceptionExtensions.cs
Go to the documentation of this file.
1// Copyright 2005-2015 Giacomo Stelluti Scala & Contributors. All rights reserved. See License.md in the project root for license information.
2
3using System;
4using System.Collections.Generic;
5using System.Linq;
6
8{
9 internal static class ExceptionExtensions
10 {
11 public static void RethrowWhenAbsentIn(this Exception exception, IEnumerable<Type> validExceptions)
12 {
13 if (!validExceptions.Contains(exception.GetType()))
14 {
15 throw exception;
16 }
17 }
18 }
19}
static void RethrowWhenAbsentIn(this Exception exception, IEnumerable< Type > validExceptions)