programming.dev
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
💡𝚂𝗆𝖺𝗋𝗍𝗆𝖺𝗇 𝙰𝗉𝗉𝗌📱 to C SharpEnglish · 11 days ago

Simplify Exception Handling with Exception Filters

www.mathiashove.com

external-link
message-square
2
link
fedilink
6
external-link

Simplify Exception Handling with Exception Filters

www.mathiashove.com

💡𝚂𝗆𝖺𝗋𝗍𝗆𝖺𝗇 𝙰𝗉𝗉𝗌📱 to C SharpEnglish · 11 days ago
message-square
2
link
fedilink
Exception filters make error handling in C# cleaner and more expressive. They let you catch only what you care about without cluttering your code with nested logic or rethrows.
  • 💡𝚂𝗆𝖺𝗋𝗍𝗆𝖺𝗇 𝙰𝗉𝗉𝗌📱OP
    link
    fedilink
    English
    arrow-up
    3
    ·
    10 days ago

    Probably debatable. I think he was more addressing when you need to pull out a specific exception this is a cleaner way to do it. Saves having to rethrow the exception.

C Sharp

csharp

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: [email protected]

A community about the C# programming language

Getting started

  • C# @ Wikipedia
  • A Tour of the C# Language
  • Learn C#

Useful resources

  • C# documentation
  • C# Language Reference
  • C# Programming Guide
  • C# Coding Conventions
  • .NET Framework Reference Source Code

IDEs and code editors

  • Visual Studio (Windows/Mac)
  • Rider (Windows/Mac/Linux)
  • Visual Studio Code (Windows/Mac/Linux)

Tools

  • Decompilers: ILSpy, dotPeek
  • Scratchpad: LINQPad
  • Online playground and IL viewer: SharpLab

Rules

  • Rule 1: Follow Lemmy rules
  • Rule 2: Be excellent to each other, no hostility towards users for any reason
  • Rule 3: No spam of tools/companies/advertisements

Related communities

  • c/dotnet
Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 4 users / day
  • 16 users / week
  • 56 users / month
  • 145 users / 6 months
  • 565 local subscribers
  • 1.72K subscribers
  • 173 Posts
  • 290 Comments
  • Modlog
  • mods:
  • Ategon
  • nibblebit
  • Spyros
  • BE: 0.19.11
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org