try to catch exeptions on ->no mail-accounts available at all<-; measure time consumption on folder-tree creation for subscription dialog

This commit is contained in:
Klaus Leithoff 2014-02-14 12:31:34 +00:00
parent 4bbda170bd
commit d6a706d9b8
2 changed files with 8 additions and 1 deletions

View File

@ -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;

View File

@ -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();