From deaf4b7d433aeab4a422f1b875f802cad16b7014 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Thu, 28 Apr 2016 22:32:25 +0100 Subject: Handle files not found --- dotnet/Mammoth/Couscous/java/net/URL.cs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'dotnet/Mammoth/Couscous/java') diff --git a/dotnet/Mammoth/Couscous/java/net/URL.cs b/dotnet/Mammoth/Couscous/java/net/URL.cs index af6e021..88479e8 100644 --- a/dotnet/Mammoth/Couscous/java/net/URL.cs +++ b/dotnet/Mammoth/Couscous/java/net/URL.cs @@ -20,6 +20,8 @@ namespace Mammoth.Couscous.java.net { } } catch (System.UriFormatException) { return ToJava.StreamToInputStream(System.IO.File.OpenRead(_url)); + } catch (System.Net.WebException exception) { + throw new java.io.IOException(exception.Message); } } } -- cgit v1.2.3