mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Utils.ErrorThrow added for when wanting to throw the exception
This commit is contained in:
parent
2c47f54752
commit
bf87746e69
@ -72,6 +72,11 @@ namespace Wabbajack.Common
|
||||
{
|
||||
LogToFile(err.ShortDescription);
|
||||
LoggerSubj.OnNext(err);
|
||||
}
|
||||
|
||||
public static void ErrorThrow(IException err)
|
||||
{
|
||||
Error(err);
|
||||
throw err.Exception;
|
||||
}
|
||||
|
||||
|
@ -73,7 +73,7 @@ namespace Wabbajack.Lib.CompilationSteps
|
||||
foreach (var match in matches)
|
||||
{
|
||||
if (match is IgnoredDirectly)
|
||||
Utils.Error(new UnconvertedError($"File required for BSA {source.Path} creation doesn't exist: {match.To}"));
|
||||
Utils.ErrorThrow(new UnconvertedError($"File required for BSA {source.Path} creation doesn't exist: {match.To}"));
|
||||
_mo2Compiler.ExtraFiles.Add(match);
|
||||
}
|
||||
|
||||
|
@ -46,12 +46,12 @@ namespace Wabbajack.Lib.Downloaders
|
||||
var status = client.GetUserStatus();
|
||||
if (!client.IsAuthenticated)
|
||||
{
|
||||
Utils.Error(new UnconvertedError($"Authenticating for the Nexus failed. A nexus account is required to automatically download mods."));
|
||||
Utils.ErrorThrow(new UnconvertedError($"Authenticating for the Nexus failed. A nexus account is required to automatically download mods."));
|
||||
return;
|
||||
}
|
||||
|
||||
if (status.is_premium) return;
|
||||
Utils.Error(new UnconvertedError($"Automated installs with Wabbajack requires a premium nexus account. {client.Username} is not a premium account."));
|
||||
Utils.ErrorThrow(new UnconvertedError($"Automated installs with Wabbajack requires a premium nexus account. {client.Username} is not a premium account."));
|
||||
}
|
||||
|
||||
public class State : AbstractDownloadState
|
||||
|
@ -140,7 +140,7 @@ namespace Wabbajack.Lib
|
||||
var hash = gameFile.FileHash();
|
||||
if (hash != esm.SourceESMHash)
|
||||
{
|
||||
Utils.Error(new InvalidGameESMError(esm, hash, gameFile));
|
||||
Utils.ErrorThrow(new InvalidGameESMError(esm, hash, gameFile));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user