Print key info in MissingKeyException message

This commit is contained in:
Alex Barney 2018-10-22 17:59:02 -05:00
parent 8c934e51c7
commit 0abd48cfb5
2 changed files with 21 additions and 0 deletions

View file

@ -539,6 +539,7 @@ namespace LibHac
public enum KeyType
{
None,
Common,
Unique,
Title

View file

@ -75,5 +75,25 @@ namespace LibHac
base.GetObjectData(info, context);
info.AddValue(nameof(Name), Name);
}
public override string Message
{
get
{
string s = base.Message;
if (Type != KeyType.None)
{
s += $"{Environment.NewLine}Key Type: {Type}";
}
if (Name != null)
{
s += $"{Environment.NewLine}Key Name: {Name}";
}
return s;
}
}
}
}