dotnet / dotnet/docs

Add supress exception

Open
#34,862 0 comments 0 reactions 0 assignees View on GitHub
dotnet-fundamentals/svc
Dominant language
No language data
Stars
4.8k
Forks
6.1k
Avg merge
19h 10m
Merged PRs (30d)
268

Description

In the chapter "When to suppress errors" should be added the example, that the logger is abstracted in its own adapter.

See Micrsoft reference implementeation eshopOnWeb https://github.com/dotnet-architecture/eShopOnWeb/blob/main/src/Infrastructure/Logging/LoggerAdapter.cs

The reason to do this, is providing the logger in an Infrastructur layer (clean code architecture/onion arhcitecture,...) and not adding it in the main program .

---
#### Document Details

⚠ *Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.*

* ID: f5662dc7-dcf6-47d5-9340-55b22ebfeca8
* Version Independent ID: 0df9ae80-f763-ba60-a876-a98e86d64887
* Content: [CA2254: Template should be a static expression - .NET](https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2254)
* Content Source: [docs/fundamentals/code-analysis/quality-rules/ca2254.md](https://github.com/dotnet/docs/blob/main/docs/fundamentals/code-analysis/quality-rules/ca2254.md)
* Product: **dotnet-fundamentals**
* GitHub Login: @Youssef1313
* Microsoft Alias: **gewarren**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.