tech debt
This commit is contained in:
parent
8649b0efe9
commit
6cfcce23cc
@ -9,7 +9,7 @@
|
||||
<Company>Forever None</Company>
|
||||
<Configurations>Debug;Release;Prerelease</Configurations>
|
||||
<PublishWithAspNetCoreTargetManifest>false</PublishWithAspNetCoreTargetManifest>
|
||||
<LangVersion>8.0</LangVersion>
|
||||
<LangVersion>default</LangVersion>
|
||||
<PackageTags>IW4MAdmin</PackageTags>
|
||||
<RepositoryUrl>https://github.com/RaidMax/IW4M-Admin/</RepositoryUrl>
|
||||
<PackageProjectUrl>https://www.raidmax.org/IW4MAdmin/</PackageProjectUrl>
|
||||
|
@ -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];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user