mirror of
https://github.com/ppy/osu.git
synced 2025-02-19 12:13:20 +08:00
Use HResult
This commit is contained in:
parent
29a1d092fa
commit
9aa88293e2
@ -36,8 +36,15 @@ namespace osu.Game.Utils
|
|||||||
|
|
||||||
if (exception != null)
|
if (exception != null)
|
||||||
{
|
{
|
||||||
if (exception is IOException ioe && ioe.Message.StartsWith("There is not enough space on the disk"))
|
if (exception is IOException ioe)
|
||||||
return;
|
{
|
||||||
|
// disk full exceptions, see https://stackoverflow.com/a/9294382
|
||||||
|
const int hr_error_handle_disk_full = unchecked((int)0x80070027);
|
||||||
|
const int hr_error_disk_full = unchecked((int)0x80070070);
|
||||||
|
|
||||||
|
if (ioe.HResult == hr_error_handle_disk_full || ioe.HResult == hr_error_disk_full)
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// since we let unhandled exceptions go ignored at times, we want to ensure they don't get submitted on subsequent reports.
|
// since we let unhandled exceptions go ignored at times, we want to ensure they don't get submitted on subsequent reports.
|
||||||
if (lastException != null &&
|
if (lastException != null &&
|
||||||
|
Loading…
Reference in New Issue
Block a user