opentelemetry-dotnet-instrumentation icon indicating copy to clipboard operation
opentelemetry-dotnet-instrumentation copied to clipboard

Policy regarding catching all possible exceptions

Open pellared opened this issue 3 years ago • 1 comments
trafficstars

Do we know the possible exceptions? we do not want to catch exceptions like OutOfMemoryException? The same comment applies to other catch statements in this PR. As for me, it can be addressed in another PR. But I guess it should be addressed.

Originally posted by @pellared in https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/pull/456#discussion_r847521868

pellared avatar Apr 11 '22 16:04 pellared

SIG meeting:

  • during the bootstrapping/initialization we can handle all exceptions. The .NET runtime handles OutOfMemoryException, StackoverflowExcception etc in a special way so it will not be caught by catch.
  • TODO: review all code with catch

pellared avatar Apr 20 '22 17:04 pellared

I reviewed all code with catch and I have not found any issue.

pellared avatar Jan 18 '23 10:01 pellared