Package br.com.caelum.tubaina

Examples of br.com.caelum.tubaina.TubainaException


      logFile.println(generatedOutput);

      return false;
    } catch (FileNotFoundException e) {
      throw new TubainaException("File could not be open", e);
    }
  }
View Full Code Here


        resourceCopyFailed = true;
      }

    }
    if (resourceCopyFailed)
      throw new TubainaException("Couldn't copy some resources. See the Logger for further information");
  }
View Full Code Here

    String bookName = Utilities.toDirectoryName(null, book.getName());
    File bookRoot = new File(outputFolder, bookName);
    try {
      File templateIncludes = new File(templateDir, "includes/");
      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) {
      throw new TubainaException("Error while copying template files", e);
    }
   
    return new TubainaHtmlDir(bookRoot, templateDir, resourceManipulatorFactory);
  }
View Full Code Here

                 new StreamSource(new StringReader(string)),
                 new StreamResult(writer));
      return writer.toString();

    } catch (TransformerException e) {
      throw new TubainaException(e);
    }

   
  }
View Full Code Here

public class XmlTag implements Tag<XmlChunk> {

  private static final String MESSAGE = "[xml] Tag is deprecated and can't be used anymore. Use [code xml] instead";

  public XmlTag(Indentator indentator) {
    throw new TubainaException(MESSAGE);
  }
View Full Code Here

    throw new TubainaException(MESSAGE);
  }
 
  @Override
  public String parse(XmlChunk chunk) {
    throw new TubainaException(MESSAGE);
  }
View Full Code Here

    try {
      PrintStream stream = new PrintStream(new FileOutputStream(new File("todo.log"), true));
      stream.println("<==========================================================>");
      stream.println(chunk.getContent().trim());
    } catch (FileNotFoundException e) {
      throw new TubainaException("File could not be read", e);
    }
    return "";
  }
View Full Code Here

  private static final String MESSAGE = "[xml] Tag is deprecated and can't be used anymore. Use [code xml] instead";

  @Override
  public String parse(XmlChunk chunk) {
    throw new TubainaException(MESSAGE);
  }
View Full Code Here

                chapterNumber++;
        }

        // TODO : Refactoring
        if (chapters.size() > 1) {
            throw new TubainaException("Only one [chapter] element is allowed per file.");
        }

        return chapters;
    }
View Full Code Here

    try {
      PrintStream stream = new PrintStream(new FileOutputStream(new File("todo.log"), true));
      stream.println("<==========================================================>");
      stream.println(chunk.getContent().trim());
    } catch (FileNotFoundException e) {
      throw new TubainaException("File could not be read", e);
    }
    return "";
  }
View Full Code Here

TOP

Related Classes of br.com.caelum.tubaina.TubainaException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.