From d6a706d9b856e9b5317e1e538b707cbab25a2a91 Mon Sep 17 00:00:00 2001 From: Klaus Leithoff Date: Fri, 14 Feb 2014 12:31:34 +0000 Subject: [PATCH] try to catch exeptions on ->no mail-accounts available at all<-; measure time consumption on folder-tree creation for subscription dialog --- mail/inc/class.mail_bo.inc.php | 6 +++++- mail/inc/class.mail_ui.inc.php | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/mail/inc/class.mail_bo.inc.php b/mail/inc/class.mail_bo.inc.php index f3adfa4599..fda7ed35b8 100644 --- a/mail/inc/class.mail_bo.inc.php +++ b/mail/inc/class.mail_bo.inc.php @@ -249,10 +249,14 @@ class mail_bo } catch (Exception $e) { - throw new egw_exception(__METHOD__." failed to instanciate mail_bo for $newprofileID with error:".$e->getMessage());; + throw new egw_exception(__METHOD__." failed to instanciate mail_bo for $newprofileID with error:".$e->getMessage()); } $_profileID = $newprofileID; } + else + { + throw new egw_exception(__METHOD__." Loading the Profile for ProfileID >".$_profileID.'< failed for icServer; '.$e->getMessage().' Trigger new instance for Default-Profile >'.$newprofileID.'< failed'); + } } } self::$instances[$_profileID]->profileID = $_profileID; diff --git a/mail/inc/class.mail_ui.inc.php b/mail/inc/class.mail_ui.inc.php index 199680b73e..434b8bba6b 100644 --- a/mail/inc/class.mail_ui.inc.php +++ b/mail/inc/class.mail_ui.inc.php @@ -189,7 +189,10 @@ class mail_ui $stmpl = new etemplate_new('mail.subscribe'); $profileId = $_GET['acc_id']; + $zstarttime = microtime (true); $sel_options['foldertree'] = $this->getFolderTree(false, $profileId,false,false); + $zendtime = microtime(true) - $zstarttime; + error_log(__METHOD__.__LINE__. " time used: ".$zendtime); $unsubscribedFolders = $this->mail_bo->fetchUnSubscribedFolders(); $allFolders = $this->mail_bo->getFolderObjects();