mirror of
https://github.com/RaidMax/IW4M-Admin.git
synced 2025-06-09 23:00:57 -05:00
tech debt
This commit is contained in:
@ -125,28 +125,6 @@ namespace SharedLibraryCore
|
||||
return str.Length > maxLength ? $"{str.Substring(0, maxLength - 3)}..." : str;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// helper method to get the information about an exception and inner exceptions
|
||||
/// </summary>
|
||||
/// <param name="ex"></param>
|
||||
/// <returns></returns>
|
||||
public static string GetExceptionInfo(this Exception ex)
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
var depth = 0;
|
||||
while (ex != null)
|
||||
{
|
||||
sb.AppendLine($"Exception[{depth}] Name: {ex.GetType().FullName}");
|
||||
sb.AppendLine($"Exception[{depth}] Message: {ex.Message}");
|
||||
sb.AppendLine($"Exception[{depth}] Call Stack: {ex.StackTrace}");
|
||||
sb.AppendLine($"Exception[{depth}] Source: {ex.Source}");
|
||||
depth++;
|
||||
ex = ex.InnerException;
|
||||
}
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
public static Permission MatchPermission(string str)
|
||||
{
|
||||
var lookingFor = str.ToLower();
|
||||
@ -1190,4 +1168,4 @@ namespace SharedLibraryCore
|
||||
return allRules[index];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user