diff options
| author | Michael Williamson <mike@zwobble.org> | 2016-06-04 16:03:56 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2016-06-04 16:03:56 +0100 |
| commit | 45e530dceda42282fae56b4c4f5fa7865f57899d (patch) | |
| tree | 685868f4bf78c64e851cbcdafd674e887bc782a5 /dotnet/Mammoth/Couscous/mammoth/internal/util/PassThroughException.cs | |
| parent | b5a83b1cb96d410e325ff8b733d550295376d8c7 (diff) | |
Remove dotnet (use submodule from dotnet repo instead)
Diffstat (limited to 'dotnet/Mammoth/Couscous/mammoth/internal/util/PassThroughException.cs')
| -rw-r--r-- | dotnet/Mammoth/Couscous/mammoth/internal/util/PassThroughException.cs | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/dotnet/Mammoth/Couscous/mammoth/internal/util/PassThroughException.cs b/dotnet/Mammoth/Couscous/mammoth/internal/util/PassThroughException.cs deleted file mode 100644 index 88597e3..0000000 --- a/dotnet/Mammoth/Couscous/mammoth/internal/util/PassThroughException.cs +++ /dev/null @@ -1,29 +0,0 @@ -using Mammoth.Couscous.java.lang; -using Mammoth.Couscous.java.io; - -namespace Mammoth.Couscous.org.zwobble.mammoth.@internal.util { - internal class PassThroughException : RuntimeException { - internal static T wrap<T>(SupplierWithException<T, IOException> supplier) { - try { - return supplier.get(); - } catch (IOException exception) { - throw new PassThroughException(exception); - } - } - - internal static T unwrap<T>(SupplierWithException<T, IOException> supplier) { - try { - return supplier.get(); - } catch (PassThroughException exception) { - throw exception._exception; - } - } - - private readonly IOException _exception; - - internal PassThroughException(IOException exception) { - _exception = exception; - } - } -} - |
