Skip to content

Do not log as error exception that is probably always thrown intentio… #786

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Oct 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 9 additions & 13 deletions java/src/main/java/com/genexus/reports/GXReport.java
Original file line number Diff line number Diff line change
Expand Up @@ -71,18 +71,14 @@ public IReportHandler getPrinter()
}
else if (getOutputType() == OUTPUT_PDF)
{
try {
String implementation = com.genexus.Application.getClientContext().getClientPreferences().getPDF_RPT_LIBRARY();
if (implementation.equals("ITEXT"))
reportHandler = new PDFReportItext2(context);
else if (implementation.equals("ITEXT8"))
reportHandler = new PDFReportItext8(context);
else
reportHandler = new PDFReportPDFBox(context);
((GXReportPDFCommons) reportHandler).setOutputStream(getOutputStream());
} catch (Exception e) {
log.error("Failed to set output stream: ", e);
}
String implementation = com.genexus.Application.getClientContext().getClientPreferences().getPDF_RPT_LIBRARY();
if (implementation.equals("ITEXT"))
reportHandler = new PDFReportItext2(context);
else if (implementation.equals("ITEXT8"))
reportHandler = new PDFReportItext8(context);
else
reportHandler = new PDFReportPDFBox(context);
((GXReportPDFCommons) reportHandler).setOutputStream(getOutputStream());
}
else {
throw new RuntimeException("Unrecognized report type: " + getOutputType());
Expand Down Expand Up @@ -139,7 +135,7 @@ protected int getOutputType() {
}

protected java.io.OutputStream getOutputStream() {
throw new RuntimeException("Output stream not set");
return null;
}

//M�todos para la implementaci�n de reportes din�micos
Expand Down