mirror of
https://github.com/ShareX/ShareX.git
synced 2024-10-01 09:47:22 +13:00
#6224: Handle all exceptions
This commit is contained in:
parent
21b8822f50
commit
e4ac1e36bd
1 changed files with 7 additions and 1 deletions
|
@ -596,11 +596,17 @@ public static bool WritePersonalPathConfig(string path)
|
|||
File.WriteAllText(PersonalPathConfigFilePath, path, Encoding.UTF8);
|
||||
return true;
|
||||
}
|
||||
catch (UnauthorizedAccessException)
|
||||
catch (UnauthorizedAccessException e)
|
||||
{
|
||||
DebugHelper.WriteException(e);
|
||||
MessageBox.Show(string.Format(Resources.Program_WritePersonalPathConfig_Cant_access_to_file, PersonalPathConfigFilePath),
|
||||
"ShareX", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
DebugHelper.WriteException(e);
|
||||
e.ShowError();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue