#6224: Handle all exceptions

This commit is contained in:
Jaex 2022-05-14 08:23:10 +03:00
parent 21b8822f50
commit e4ac1e36bd

View file

@ -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();
}
}
}