[MPIR-478] Allow to save avatars images for team report during project build by slawekjaranowski · Pull Request #97 · apache/maven-project-info-reports-plugin (original) (raw)

Choose a reason for hiding this comment

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

so handle the IOException there, not here.

Also, if renderBody cannot throw any exception, then don't throw an exception in renderBody. Make sure that whatever code you call inside renderBody does not throw any exception, runtime exceptions included. Instead call all the code that might throw exceptions before you ever call renderBody, load up all the URLs or pics or whatever in memory at the beginning of executeReport, and only start rendering once all the resources are loaded and will not throw any exceptions during rendering.

Though in this case I really think it's simpler and easier to just use the default spacer image.