Made lots of error classes members public gets

This commit is contained in:
Justin Swanson 2019-12-04 23:11:15 -06:00
parent e946fc7ea4
commit 760461ab3e
3 changed files with 20 additions and 20 deletions

View File

@ -8,25 +8,25 @@ namespace Wabbajack.Common.StatusFeed.Errors
{
public class _7zipReturnError : AStatusMessage, IError
{
private string _destination;
private string _filename;
private int _code;
private string _7zip_output;
public string Destination { get; }
public string Filename;
public int Code;
public string _7zip_output;
public override string ShortDescription => $"7Zip returned an error while executing";
public override string ExtendedDescription =>
$@"7Zip.exe should always return 0 when it finishes executing. While extracting {_filename} 7Zip encountered some error and
instead returned {_code} which indicates there was an error. The archive might be corrupt or in a format that 7Zip cannot handle. Please verify the file is valid and that you
haven't run out of disk space in the {_destination} folder.
$@"7Zip.exe should always return 0 when it finishes executing. While extracting {Filename} 7Zip encountered some error and
instead returned {Code} which indicates there was an error. The archive might be corrupt or in a format that 7Zip cannot handle. Please verify the file is valid and that you
haven't run out of disk space in the {Destination} folder.
7Zip Output:
{_7zip_output}";
public _7zipReturnError(int code, string filename, string destination, string output)
{
_code = code;
_filename = filename;
_destination = destination;
Code = code;
Filename = filename;
Destination = destination;
_7zip_output = output;
}
}

View File

@ -15,7 +15,7 @@ namespace Wabbajack.Common.StatusFeed.Errors
_msg = msg;
}
public override string ShortDescription { get => _msg; }
public override string ExtendedDescription { get; } = "";
public override string ShortDescription => _msg;
public override string ExtendedDescription => _msg;
}
}

View File

@ -10,29 +10,29 @@ namespace Wabbajack.Lib.CompilationSteps.CompilationErrors
{
public class InvalidGameESMError : AErrorMessage
{
private readonly string _hash;
private readonly string _path;
public string Hash { get; }
public string PathToFile { get; }
private readonly CleanedESM _esm;
private string _gameFileName => Path.GetFileName(_esm.To);
public string GameFileName => Path.GetFileName(_esm.To);
public override string ShortDescription
{
get =>
$"Game file {_gameFileName} has a hash of {_hash} which does not match the expected value of {_esm.SourceESMHash}";
$"Game file {GameFileName} has a hash of {Hash} which does not match the expected value of {_esm.SourceESMHash}";
}
public override string ExtendedDescription
{
get =>
$@"This modlist is setup to perform automatic cleaning of the stock game file {_gameFileName} in order to perform this cleaning Wabbajack must first verify that the
source file is in the correct state. It seems that the file in your game directory has a hash of {_hash} instead of the expect hash of {_esm.SourceESMHash}. This could be caused by
$@"This modlist is setup to perform automatic cleaning of the stock game file {GameFileName} in order to perform this cleaning Wabbajack must first verify that the
source file is in the correct state. It seems that the file in your game directory has a hash of {Hash} instead of the expect hash of {_esm.SourceESMHash}. This could be caused by
the modlist expecting a different of the game than you currently have installed, or perhaps you have already cleaned the file. You could attempt to fix this error by re-installing
the game, and then attempting to re-install this modlist. Also verify that the version of the game you have installed matches the version expected by this modlist.";
}
public InvalidGameESMError(CleanedESM esm, string hash, string path)
{
_hash = hash;
_path = path;
Hash = hash;
PathToFile = path;
_esm = esm;
}
}