1
0
Fork 0
mirror of https://github.com/sbrl/Nibriboard.git synced 2018-01-10 21:33:49 +00:00

[server] Add addtional error handling to enbedded file server

This commit is contained in:
Starbeamrainbowlabs 2017-06-26 22:31:48 +01:00
parent 75641b4f30
commit 41e6b46311

View file

@ -54,8 +54,16 @@ namespace Nibriboard.Client
byte[] embeddedFile = EmbeddedFiles.ReadAllBytes(expandedFilePath);
response.ContentLength = embeddedFile.Length;
response.Content.Write(embeddedFile, 0, embeddedFile.Length);
try
{
response.Content.Write(embeddedFile, 0, embeddedFile.Length);
}
catch(Exception error)
{
Log.WriteLine($"[Nibriboard/EmbeddedFileHandler] Error: {error.Message} Details:");
Log.WriteLine(error.ToString());
}
logRequest(request, response);
}