X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.document%2Fsrc%2Forg%2Fsimantics%2Fdocument%2FDocumentUtils.java;h=16a81f6f33636a772874d20b679637d3cfff7c67;hb=HEAD;hp=e539df2c3aa27cdc0cb276363809d52e125e48ba;hpb=0ae2b770234dfc3cbb18bd38f324125cf0faca07;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.document/src/org/simantics/document/DocumentUtils.java b/bundles/org.simantics.document/src/org/simantics/document/DocumentUtils.java index e539df2c3..16a81f6f3 100644 --- a/bundles/org.simantics.document/src/org/simantics/document/DocumentUtils.java +++ b/bundles/org.simantics.document/src/org/simantics/document/DocumentUtils.java @@ -28,7 +28,6 @@ import org.simantics.db.common.request.PossibleIndexRoot; import org.simantics.db.common.request.ResourceRead; import org.simantics.db.common.request.UniqueRead; import org.simantics.db.common.request.WriteResultRequest; -import org.simantics.db.common.utils.Logger; import org.simantics.db.exception.DatabaseException; import org.simantics.db.layer0.variable.Variable; import org.simantics.db.layer0.variable.Variables; @@ -194,22 +193,15 @@ public class DocumentUtils { } } - public void print(RequestProcessor processor, Resource res, String wiki, String css, DocumentSettings settings, final PdfWriter writer, final Document document) throws DocumentException { - try { - Exportable exp = processor.syncRequest(new UniqueRead() { - - @Override - public Exportable perform(ReadGraph graph) throws DatabaseException { - return new Exportable(graph, res, wiki, css, settings, true); - } - - }); - exp.export(document, writer); - } catch (DocumentException e) { - Logger.defaultLogError(e); - } catch (DatabaseException e) { - Logger.defaultLogError(e); - } + public int print(RequestProcessor processor, Resource res, String wiki, String css, DocumentSettings settings, final PdfWriter writer, final Document document) + throws DocumentException, DatabaseException { + Exportable exp = processor.syncRequest(new UniqueRead() { + @Override + public Exportable perform(ReadGraph graph) throws DatabaseException { + return new Exportable(graph, res, wiki, css, settings, true); + } + }); + return exp.export(document, writer); } public static String indexRootPath(ReadGraph graph, Variable selection) throws DatabaseException {