Mercurial Hosting > nabble
changeset 39:b5d56f522ea3
error handling
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Sat, 11 Jul 2020 21:39:52 -0600 |
parents | 04d4c291484b |
children | f770c4076954 |
files | src/nabble/model/SiteImpl.java |
diffstat | 1 files changed, 13 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/src/nabble/model/SiteImpl.java Sat Jul 11 21:30:58 2020 -0600 +++ b/src/nabble/model/SiteImpl.java Sat Jul 11 21:39:52 2020 -0600 @@ -1013,15 +1013,19 @@ File file = backup(); // Don't sent the deletion email if the site has only one node if (getRootNode().getDescendantCount() > 1) { - Template template = getTemplate( "site deletion email", - BasicNamespace.class, NabbleNamespace.class - ); - Map<String,Object> params = new HashMap<String,Object>(); - params.put("file",file.getName()); - template.run( TemplatePrintWriter.NULL, params, - new BasicNamespace(template), - new NabbleNamespace(this) - ); + try { + Template template = getTemplate( "site deletion email", + BasicNamespace.class, NabbleNamespace.class + ); + Map<String,Object> params = new HashMap<String,Object>(); + params.put("file",file.getName()); + template.run( TemplatePrintWriter.NULL, params, + new BasicNamespace(template), + new NabbleNamespace(this) + ); + } catch(RuntimeException e ) { + logger.error("deletion email failed",e); + } } } kill();