diff --git a/DTLib.Dtsod/V24/KerepTypes/KVPair.cs b/DTLib.Dtsod/V24/KerepTypes/KVPair.cs index 9ad84b5..e3e0fc0 100644 --- a/DTLib.Dtsod/V24/KerepTypes/KVPair.cs +++ b/DTLib.Dtsod/V24/KerepTypes/KVPair.cs @@ -22,6 +22,6 @@ public struct KVPair public override string ToString() { throw new NotImplementedException("Marshal.PtrToStringUTF8 can't get non-ascii chars?"); - return $"{{{Marshal.PtrToStringUTF8(key)}, {value}}}"; + //return $"{{{Marshal.PtrToStringUTF8(key)}, {value}}}"; } } \ No newline at end of file diff --git a/DTLib.Exceptions/Ben.Demystifier b/DTLib.Exceptions/Ben.Demystifier index 5f59312..ffddfa2 160000 --- a/DTLib.Exceptions/Ben.Demystifier +++ b/DTLib.Exceptions/Ben.Demystifier @@ -1 +1 @@ -Subproject commit 5f593123dea943703bafa836f30c76101cf62a89 +Subproject commit ffddfa21ecd669dc5c1189ac2744737bc084e165 diff --git a/DTLib.Exceptions/DTLib.Exceptions.csproj b/DTLib.Exceptions/DTLib.Exceptions.csproj index 33fc44f..0bc67f8 100644 --- a/DTLib.Exceptions/DTLib.Exceptions.csproj +++ b/DTLib.Exceptions/DTLib.Exceptions.csproj @@ -10,8 +10,9 @@ - + + - + diff --git a/DTLib.Exceptions/MyExceptions.cs b/DTLib.Exceptions/MyExceptions.cs index 91b3fae..b542985 100644 --- a/DTLib.Exceptions/MyExceptions.cs +++ b/DTLib.Exceptions/MyExceptions.cs @@ -1,10 +1,14 @@ global using DTLib; global using DTLib.Extensions; +global using System; using Ben.Demystifier; namespace DTLib.Exceptions; -public static class MyExceptions +public static class MyExceptionHelper { - + public static string ExToString(Exception ex) + { + return ex.ToStringDemystified(); + } } diff --git a/DTLib.sln b/DTLib.sln index 0fdc050..edbbbe6 100644 --- a/DTLib.sln +++ b/DTLib.sln @@ -9,7 +9,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DTLib.Tests", "DTLib.Tests\ EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{6308F24E-A4FF-46B3-B72F-30E05DDCB1D5}" ProjectSection(SolutionItems) = preProject - .editorconfig = .editorconfig .gitignore = .gitignore README.md = README.md EndProjectSection @@ -18,6 +17,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DTLib.Dtsod", "DTLib.Dtsod\ EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DTLib.Network", "DTLib.Network\DTLib.Network.csproj", "{24B7D0A2-0462-424D-B3F5-29A6655FE472}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DTLib.Exceptions", "DTLib.Exceptions\DTLib.Exceptions.csproj", "{A999EC29-ADBA-4A89-8EBD-E28594F6CE0A}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ben.Demystifier", "DTLib.Exceptions\Ben.Demystifier\src\Ben.Demystifier\Ben.Demystifier.csproj", "{001D56C7-08D3-4F24-802C-C11077510D4F}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -40,6 +43,14 @@ Global {24B7D0A2-0462-424D-B3F5-29A6655FE472}.Debug|Any CPU.Build.0 = Debug|Any CPU {24B7D0A2-0462-424D-B3F5-29A6655FE472}.Release|Any CPU.ActiveCfg = Release|Any CPU {24B7D0A2-0462-424D-B3F5-29A6655FE472}.Release|Any CPU.Build.0 = Release|Any CPU + {A999EC29-ADBA-4A89-8EBD-E28594F6CE0A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A999EC29-ADBA-4A89-8EBD-E28594F6CE0A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A999EC29-ADBA-4A89-8EBD-E28594F6CE0A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A999EC29-ADBA-4A89-8EBD-E28594F6CE0A}.Release|Any CPU.Build.0 = Release|Any CPU + {001D56C7-08D3-4F24-802C-C11077510D4F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {001D56C7-08D3-4F24-802C-C11077510D4F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {001D56C7-08D3-4F24-802C-C11077510D4F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {001D56C7-08D3-4F24-802C-C11077510D4F}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/DTLib/Filesystem/EmbeddedResources.cs b/DTLib/Filesystem/EmbeddedResources.cs index 21ab829..1512297 100644 --- a/DTLib/Filesystem/EmbeddedResources.cs +++ b/DTLib/Filesystem/EmbeddedResources.cs @@ -12,7 +12,7 @@ public static class EmbeddedResources public static byte[] ReadBynary(string resourcePath, Assembly assembly = null) { - if (assembly == null) assembly = Assembly.GetCallingAssembly(); + if (assembly is null) assembly = Assembly.GetCallingAssembly(); using var reader = new BinaryReader(GetResourceStream(resourcePath, assembly)); return reader.ReadBytes(int.MaxValue); } @@ -20,7 +20,7 @@ public static class EmbeddedResources public static string ReadText(string resourcePath, Assembly assembly = null) { - if (assembly == null) assembly = Assembly.GetCallingAssembly(); + if (assembly is null) assembly = Assembly.GetCallingAssembly(); using var reader = new StreamReader(GetResourceStream(resourcePath, assembly)); return reader.ReadToEnd(); }