From 815c65e0635b3c13482303778d48c768ac4d36d9 Mon Sep 17 00:00:00 2001 From: Brian Jones Date: Tue, 23 Feb 2016 14:38:37 -0500 Subject: [PATCH] SAK-30361 user membership bulk change status needs more exception handling code --- .../java/org/sakaiproject/umem/tool/ui/SiteListBean.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/usermembership/tool/src/java/org/sakaiproject/umem/tool/ui/SiteListBean.java b/usermembership/tool/src/java/org/sakaiproject/umem/tool/ui/SiteListBean.java index 9e591281687e..a269884e2a1c 100644 --- a/usermembership/tool/src/java/org/sakaiproject/umem/tool/ui/SiteListBean.java +++ b/usermembership/tool/src/java/org/sakaiproject/umem/tool/ui/SiteListBean.java @@ -42,7 +42,6 @@ import javax.faces.context.ExternalContext; import javax.faces.context.FacesContext; import javax.faces.event.ActionEvent; -import org.apache.commons.lang.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -669,6 +668,14 @@ private void toggleUserStatusInSites( boolean active ) { LOG.warn( "permission exception updating realm, id=" + realmID, ex ); } + catch( NullPointerException ex ) + { + LOG.warn( "could not retieve user (" + userId + ") or user's role from site (" + site.getId() + ")", ex ); + } + catch( Exception ex ) + { + LOG.error( "unexpected error occurred, user=" + userId + ", site=" + site.getId(), ex ); + } } } }