Add and use ThrowOnError global (temp)

This commit is contained in:
Matt Nadareski
2020-09-15 12:12:13 -07:00
parent ab06bf89f6
commit 91f659dca2
34 changed files with 468 additions and 30 deletions

View File

@@ -187,8 +187,11 @@ namespace SabreTools.Library.IO
else
return DatFormat.ClrMamePro;
}
catch (Exception)
catch (Exception ex)
{
if (Globals.ThrowOnError)
throw ex;
return 0;
}
}
@@ -298,9 +301,11 @@ namespace SabreTools.Library.IO
outFileType = FileType.ZstdArchive;
}
}
catch (Exception)
catch (Exception ex)
{
// Don't log file open errors
if (Globals.ThrowOnError)
throw ex;
}
return outFileType;