mirror of
https://github.com/project-redbud/FunGame-Core.git
synced 2025-12-05 16:16:33 +00:00
25 lines
588 B
C#
25 lines
588 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using Milimoe.FunGame.Core.Entity;
|
|
|
|
namespace Milimoe.FunGame.Core.Library.Exception
|
|
{
|
|
public static class ExceptionHelper
|
|
{
|
|
public static string GetStackTrace(this System.Exception e)
|
|
{
|
|
if (e.Message != null && e.Message != "")
|
|
{
|
|
return $"ERROR: {e.Message}\n{e.StackTrace}";
|
|
}
|
|
else
|
|
{
|
|
return $"ERROR: \n{e.StackTrace}";
|
|
}
|
|
}
|
|
}
|
|
}
|