Browse files

better error message

  • Loading branch information...
1 parent adcb461 commit 5630d8c376fd12799436f85c3848215d5a44fa52 @csokol csokol committed Jan 23, 2013
View
4 src/main/java/br/com/caelum/tubaina/io/TubainaHtmlIO.java
@@ -27,7 +27,9 @@ public TubainaHtmlDir createTubainaDir(File outputFolder, Book book) {
File bookRoot = new File(outputFolder, bookName);
try {
File templateIncludes = new File(templateDir, "includes/");
- if (!templateIncludes.exists()) throw new TubainaException("why?");
+ if (!templateIncludes.exists()) {
+ throw new TubainaException("Could not find includes dir at: " + templateIncludes.getAbsolutePath() + ".");
+ }
NotFileFilter excludingVersionControlFiles = new NotFileFilter(new NameFileFilter(Arrays.asList("CVS", ".svn", ".git")));
FileUtilities.copyDirectoryToDirectory(templateIncludes, bookRoot, excludingVersionControlFiles);
} catch (IOException e) {
View
4 src/main/java/br/com/caelum/tubaina/io/TubainaKindleIO.java
@@ -24,7 +24,9 @@ public TubainaKindleIO(File templateDir, ResourceManipulatorFactory resourceMani
public TubainaHtmlDir createTubainaDir(File bookRoot, Book book) {
try {
File templateIncludes = new File(templateDir, "includes/");
- if (!templateIncludes.exists()) throw new TubainaException("why?");
+ if (!templateIncludes.exists()) {
+ throw new TubainaException("Could not find includes dir at: " + templateIncludes.getAbsolutePath() + ".");
+ }
NotFileFilter excludingVersionControlFiles = new NotFileFilter(new NameFileFilter(Arrays.asList("CVS", ".svn", ".git")));
FileUtilities.copyDirectoryToDirectory(templateIncludes, bookRoot, excludingVersionControlFiles);
} catch (IOException e) {

0 comments on commit 5630d8c

Please sign in to comment.