Index: jrst2/src/java/org/codelutin/jrst/JRST.java diff -u jrst2/src/java/org/codelutin/jrst/JRST.java:1.2 jrst2/src/java/org/codelutin/jrst/JRST.java:1.3 --- jrst2/src/java/org/codelutin/jrst/JRST.java:1.2 Fri Nov 10 14:21:11 2006 +++ jrst2/src/java/org/codelutin/jrst/JRST.java Fri Dec 29 17:59:33 2006 @@ -23,15 +23,16 @@ * Created: 3 nov. 06 20:56:00 * * @author poussin - * @version $Revision: 1.2 $ + * @version $Revision: 1.3 $ * - * Last update: $Date: 2006/11/10 14:21:11 $ + * Last update: $Date: 2006/12/29 17:59:33 $ * by : $Author: bpoussin $ */ package org.codelutin.jrst; import java.io.File; +import java.io.FileNotFoundException; import java.io.FileWriter; import java.io.IOException; import java.io.InputStreamReader; @@ -157,6 +158,9 @@ } else { stylesheet = JRST.class.getResource(xsl); } + if (stylesheet == null) { + throw new FileNotFoundException("Can't find stylesheet: " + xsl); + } doc = gen.transform(doc, stylesheet); }