Exception handling for email

Exception handling for email

Issue-ID: PORTAL-898
Change-Id: I7f14a7c75c8303330689fa17bbaac6759a91d15a
Signed-off-by: Sudarshan Kumar <sudarshan.kumar@att.com>
diff --git a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/controller/FunctionalMenuController.java b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/controller/FunctionalMenuController.java
index abbd854..dd5f5f4 100644
--- a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/controller/FunctionalMenuController.java
+++ b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/controller/FunctionalMenuController.java
@@ -583,8 +583,12 @@
 			isSystemUser = user.isSystemUser();
 			emailStr = user.getEmail();
 			if (emailStr == null || emailStr.equals("")) {
-				EPUser userResult = searchService.searchUserByUserId(orgUserIdStr);
-				emailStr = userResult.getEmail();
+				try {
+					EPUser userResult = searchService.searchUserByUserId(orgUserIdStr);
+					emailStr = userResult.getEmail();
+				}catch(Exception ex) { 
+					logger.error(EELFLoggerDelegate.errorLogger, "searchUserByUserId call failed", ex); 
+				} 
 			}
 			SimpleDateFormat sdf = new SimpleDateFormat("MM/dd/yyyy hh:mm:ss Z a");
 			Date lastLoginDate = user.getLastLoginDate();