0

I'm developing a .NET Core 2.1 application, and I need to log the exception details with my custom method. When I get stack trace into a variable it is not getting full details but I can see enough details through the text visualizer visual studio.

Below is the example:

at System.Number.StringToNumber(ReadOnlySpan`1 str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
   at System.Number.ParseInt32(ReadOnlySpan`1 s, NumberStyles style, NumberFormatInfo info)
   at System.Int32.Parse(String s)
   at APSM.BLL.BusinessObjects.ManageSpecification.ManageDashboard.<GetPendingInspectionListAsync>d__12.MoveNext() in D:\Mehaboob\Works\AutoPSM\APSM.BLL\BusinessObjects\ManageSpecification\ManageDashboard.cs:line 138

And in the variable:

System.FormatException: Input string was not in a correct format.
   at System.Number.StringToNumber(ReadOnlySpan`1 str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
   at System.Number.ParseInt32(ReadOnlySpan`1 s, NumberStyles style, NumberFormatInfo info)
   at System.Int32.Parse(String s)
   at APSM.BLL.BusinessObjects.ManageSpecification.ManageDashboard.GetPendingInspectionListAsync(DashboardVM dashboardVM)

You can see in the variable there is no line number and missing something. What is the way to get a full stack trace?

Mehaboob
  • 121
  • 2
  • 12

0 Answers0