Fixes exception not showing c++ stacktrace in some cases.

This commit is contained in:
Deukhoofd 2021-04-30 13:53:41 +02:00
parent 3cb243175c
commit e1dadddf06
Signed by: Deukhoofd
GPG Key ID: F63E044490819F6F
1 changed files with 14 additions and 6 deletions

View File

@ -11,14 +11,22 @@ namespace PkmnLibSharp.Utilities
Stack = stack; Stack = stack;
} }
public override string Message
{
get
{
var s = base.Message;
if (Stack != null)
{
s += Environment.NewLine + Stack;
}
return s;
}
}
public override string ToString() public override string ToString()
{ {
var s = base.ToString(); return Message;
if (Stack != null)
{
s += Environment.NewLine + Stack;
}
return s;
} }
} }
} }