Skip to content
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

55 html groovy template #92

Merged
merged 4 commits into from
Nov 14, 2018
Merged

55 html groovy template #92

merged 4 commits into from
Nov 14, 2018

Conversation

soraksh
Copy link
Contributor

@soraksh soraksh commented Nov 8, 2018

No description provided.

* @return if it is groovy html template.
*/
boolean isGroovy();

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Set method default, for backforward compatibility with Reporting. By default returns false

htmlTemplate.make(templateModel).writeTo(htmlWriter);
htmlWriter.close();
} catch (Exception e) {
throw wrapWithReportingException("Unable to write Groovy template content", e);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change exception message to: "An error occurred while rendering html document." - same as for FreeMarker template

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And add processing reporting exception: not to wrap exception again. It same as for FreemarkerTemplate

throw e;
} catch (Exception e) {
throw wrapWithReportingException("An error occurred while rendering html document.", e);
if (Boolean.TRUE.equals(reportTemplate.isGroovy())){
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reportTemplate.isGroovy returns value type boolean, not object type Boolean, so you can check without Boolean.TRUE

@andreysubbotin andreysubbotin merged commit 687c664 into master Nov 14, 2018
@soraksh soraksh deleted the 55-HTML-Groovy-template branch May 15, 2019 07:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants