mirror of
https://github.com/Thealexbarney/LibHac.git
synced 2024-11-14 10:49:41 +01:00
Print key info in MissingKeyException message
This commit is contained in:
parent
8c934e51c7
commit
0abd48cfb5
2 changed files with 21 additions and 0 deletions
|
@ -539,6 +539,7 @@ namespace LibHac
|
||||||
|
|
||||||
public enum KeyType
|
public enum KeyType
|
||||||
{
|
{
|
||||||
|
None,
|
||||||
Common,
|
Common,
|
||||||
Unique,
|
Unique,
|
||||||
Title
|
Title
|
||||||
|
|
|
@ -75,5 +75,25 @@ namespace LibHac
|
||||||
base.GetObjectData(info, context);
|
base.GetObjectData(info, context);
|
||||||
info.AddValue(nameof(Name), Name);
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue