Skip to content
This repository has been archived by the owner on Apr 2, 2020. It is now read-only.

Commit

Permalink
Handle IOException gracefully when writing out cached request result
Browse files Browse the repository at this point in the history
  • Loading branch information
hach-que committed Apr 11, 2015
1 parent 7dca884 commit 762a871
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 2 deletions.
Binary file not shown.
Binary file modified Protobuild.Internal/BuildResources/GenerateSolution.xslt.lzma
Binary file not shown.
Binary file modified Protobuild.Internal/BuildResources/JSILTemplate.htm.lzma
Binary file not shown.
Binary file modified Protobuild.Internal/BuildResources/SelectSolution.xslt.lzma
Binary file not shown.
11 changes: 9 additions & 2 deletions Protobuild.Internal/Packages/PackageLookup/PackageLookup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,16 @@ public void Lookup(
{
throw new InvalidOperationException((string)apiData.error);
}
using (var writer = new StreamWriter(this.GetLookupCacheFilename(uri)))
try
{
using (var writer = new StreamWriter(this.GetLookupCacheFilename(uri)))
{
writer.Write(jsonString);
}
}
catch (IOException ex)
{
writer.Write(jsonString);
Console.WriteLine("WARNING: Unable to save cached result of request.");
}
}
catch (WebException)
Expand Down
Binary file modified Protobuild.exe
Binary file not shown.
Binary file modified Protobuild/Protobuild.Internal.dll.lzma
Binary file not shown.

0 comments on commit 762a871

Please sign in to comment.