{\r
public class ErrMsg\r
{\r
+// nullable reference types are avaiable only since c# 8 (.net core 3.0), by default nullability is enabled only since .net 6\r
+// for builds with .NET 6+ sdks NET6_0_OR_GREATER is set, this "if" condition doesn't need any futher updates for new sdks in future\r
+#if NET6_0_OR_GREATER\r
+ public string? SymName { get; set; }\r
+ public string? Message { get; set; }\r
+#else\r
public string SymName { get; set; }\r
public string Message { get; set; }\r
+#endif\r
public int Code { get; set;}\r
}\r
\r
return;\r
}\r
Dictionary<string, ErrMsg> errmsgs = new Dictionary<string, ErrMsg>();\r
+\r
+// nullable reference types are avaiable only since c# 8 (.net core 3.0), by default nullability is enabled only since .net 6\r
+// for builds with .NET 6+ sdks NET6_0_OR_GREATER is set, this "if" condition doesn't need any futher updates for new sdks in future\r
+#if NET6_0_OR_GREATER\r
+ string? hresult = null;\r
+ string? msg=null;\r
+ string? symname = null;\r
+ string? comment = null;\r
+ string? sourcefilename = args[0];\r
+ string? outputfilename = null;\r
+ string? hfilename = null;\r
+#else\r
string hresult = null;\r
string msg=null;\r
string symname = null;\r
string sourcefilename = args[0];\r
string outputfilename = null;\r
string hfilename = null;\r
+#endif\r
int FaciltyUrt=0x13; // The source of the error code is .NET CLR.\r
int SeveritySuccess=0;\r
int SeverityError=1;\r
} else {\r
errmsg.Message = "\"" + symname + "\"";\r
}\r
- if (!errmsgs.ContainsKey(hresult)) {\r
+ if (hresult != null && !errmsgs.ContainsKey(hresult)) {\r
errmsgs.Add(key: hresult, value: errmsg);\r
}\r
}\r