Exception if file is not found

Sep 20, 2013 at 5:24 PM
Is there a way to make a bundle throw an exception if a file is not found?
Sep 23, 2013 at 7:32 PM
Anyone?
Sep 26, 2013 at 9:37 PM
Can you describe your scenario in more detail? What are you trying to do exactly? Are you referring to compiling multiple source files into one output file via the --out switch?
Sep 27, 2013 at 1:06 AM
Sorry, I should have been more specific.

The scenario is a regular js/css bundling for asp.net mvc. I'd like the bundle to throw an exception if you try to include an inexistent file.

When creating a bundle, it throws exceptions if you call IncludeDirectory for a non-existent path, but doesn't throw an exception if you call Include for a non-existent file.
I end up extending the bundle class and doing the check for each file added with Include.

Was wondering why you throw an exception for folders, but not for files. I was getting really annoyed of errors in javascript because some file was not being included in the bundle because of some typo. It should always throw exceptions or never. Throwing for one but not for the other is very inconsistent.
Nov 20, 2013 at 11:06 PM
can't agree more!