Makes the access denied config error message saner

This commit is contained in:
Cyberboss
2017-09-21 12:30:19 -04:00
parent 951eb57ee4
commit 48719fd3aa
+17
View File
@@ -78,6 +78,12 @@ namespace TGServerService
return File.ReadAllText(path);
}
}
catch (UnauthorizedAccessException e)
{
//no need for the full stacktrace
error = e.Message;
return null;
}
catch (Exception e)
{
error = e.ToString();
@@ -114,6 +120,11 @@ namespace TGServerService
return null;
}
}
catch (UnauthorizedAccessException e)
{
//no need for the full stacktrace
return e.Message;
}
catch (Exception e)
{
return e.ToString();
@@ -134,6 +145,12 @@ namespace TGServerService
error = null;
return result;
}
catch (UnauthorizedAccessException e)
{
//no need for the full stacktrace
error = e.Message;
return null;
}
catch (Exception e)
{
error = e.ToString();