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
3
using
System;
4
using
System.Collections.Generic;
5
using
System.Linq;
6
7
namespace
CommandLine.Infrastructure
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
}
CommandLine.Infrastructure.ExceptionExtensions
Definition
ExceptionExtensions.cs:10
CommandLine.Infrastructure.ExceptionExtensions.RethrowWhenAbsentIn
static void RethrowWhenAbsentIn(this Exception exception, IEnumerable< Type > validExceptions)
Definition
ExceptionExtensions.cs:11
CommandLine.Infrastructure
Definition
EnumerableExtensions.cs:8
deps
commandlineparser
src
CommandLine
Infrastructure
ExceptionExtensions.cs
Generated by
1.9.8