ExceptionHelper.cs 282 B

123456789101112131415161718
  1. using System;
  2. using ETModel;
  3. namespace ETHotfix
  4. {
  5. public static class ExceptionHelper
  6. {
  7. public static string ToStr(this Exception exception)
  8. {
  9. if (Define.IsILRuntime)
  10. {
  11. return (string) exception.Data["StackTrace"];
  12. }
  13. return exception.ToString();
  14. }
  15. }
  16. }