Comments (3)
Hi Gene,
As you noticed, right now it is not possible to write that code. However, if you can wait till Sunday, I will implement a custom ExceptionHandler
for FileNotFoundException
, so that you will be able to write code like this:
Raise.FileNotFoundException.If(condition, path, msg);
Raise.FileNotFoundException.IfNot(condition, path, msg);
Raise.FileNotFoundException.IfFileNotExists(path, msg);
If this is OK for you, then on Sunday I will implement and publish the new handler. If you have other exceptions for which you think an handler should exist, please suggest them in a separate issue.
from thrower.
Done and released on NuGet.
Closing the issue, let me know if this does not solve your problem.
from thrower.
Works great. Thanks!
from thrower.
Related Issues (7)
- IfIsNull does not handle Nullable<T> type HOT 1
- Resharper warning "Possible multiple enumeration of IEnumerable" when validating enumerable parameters HOT 3
- JetBrains Annotations: Part II HOT 5
- Method to check value for Guid.Empty. HOT 2
- There is no documentation for exceptions of the IndexOutOfRangeExceptionHandler methods.
- Localization of default messages. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from thrower.