Skip to content

Latest commit

 

History

History
17 lines (15 loc) · 334 Bytes

ExceptionPassedAsTemplateArgumentProblem.md

File metadata and controls

17 lines (15 loc) · 334 Bytes

Exception passed as a template argument

Noncompliant Code Example:

catch (Exception exception)
{
   Log.Error(ex, "Disk quota {Quota} MB exceeded {Exception}", quota, exception);
}

Compliant Solution:

catch (Exception exception)
{
   Log.Error(exception, "Disk quota {Quota} MB exceeded", quota);
}