handle bad requests better (don't fail when connection not available)
Don't crash when writing log to protected directory.
This commit is contained in:
parent
ab0f591773
commit
7d8dff4040
5 changed files with 32 additions and 5 deletions
|
|
@ -153,6 +153,14 @@ namespace MatterHackers.MatterControl
|
|||
{
|
||||
Console.WriteLine("Web exception occurred. Status code: {0}", ex.Status);
|
||||
}
|
||||
catch (IOException ioException)
|
||||
{
|
||||
Console.WriteLine("Web exception occurred. Message: {0}", ioException.Message);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MatterControlApplication.Instance.ReportException(e);
|
||||
}
|
||||
}
|
||||
return request;
|
||||
}
|
||||
|
|
@ -161,7 +169,7 @@ namespace MatterHackers.MatterControl
|
|||
{
|
||||
if (request == null)
|
||||
{
|
||||
throw new ArgumentNullException("request");
|
||||
return null;
|
||||
}
|
||||
HttpWebResponse response = null;
|
||||
try
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue