Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

better error message

  • Loading branch information...
commit 5630d8c376fd12799436f85c3848215d5a44fa52 1 parent adcb461
@csokol csokol authored
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) {
Please sign in to comment.
Something went wrong with that request. Please try again.