When To Validate and When To Throw Exceptions?

Опубликовано: 29 Ноябрь 2023
на канале: Ardalis
9,017
554

When to Validate and When to Throw Exceptions (or use Guard Clauses)?

Hey everyone, I'm Steve Smith aka ardalis!

When should you rely on validation, and when should you use exceptions or guard clauses? What about return types like Result or Result of T?

Links

https://github.com/ardalis/GuardClauses
https://github.com/ardalis/Result
https://ardalis.com/guard-clauses-and...
   • What are Guard Clauses?   (What are Guard Clauses?)
https://deviq.com/design-patterns/gua...
https://www.nuget.org/packages/Ardali...
https://www.nuget.org/packages/Ardali...

Check out my courses:
https://ardalis.com/training-classes/
https://www.pluralsight.com/authors/s...

Consulting and Training: https://NimblePros.com and @nimblepros

Developer Group Mentoring: https://devBetter.com

Free Weekly Email Tips:
https://ardalis.com/tips/

If you read this far, I hope you liked the video and consider subscribing to my channel!

Find me:
https://ardalis.com
  / ardalis  
https://github.com/ardalis
  / stevenandrewsmith  
https://bsky.app/profile/ardalis.com

#dotnet #deviq #ardalis #nimblepros #visualstudio #csharp #designpatterns #guard #guards #guardclause #guardclauses #nuget #cleancode #validation #fluentvalidation #result


Смотрите видео When To Validate and When To Throw Exceptions? онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Ardalis 29 Ноябрь 2023, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 9,01 раз и оно понравилось 55 людям.