mirror of
https://github.com/the-djmaze/snappymail.git
synced 2024-09-20 07:35:55 +08:00
Detailed error message on account switch failure for #1594
This commit is contained in:
parent
288ff23f2b
commit
7a1652972d
|
@ -205,9 +205,13 @@ trait UserAuth
|
|||
if (!isset($aAccounts[$sEmail])) {
|
||||
throw new ClientException(Notifications::AccountDoesNotExist);
|
||||
}
|
||||
$oAccount = AdditionalAccount::NewInstanceFromTokenArray(
|
||||
$this, $aAccounts[$sEmail]
|
||||
);
|
||||
try {
|
||||
$oAccount = AdditionalAccount::NewInstanceFromTokenArray(
|
||||
$this, $aAccounts[$sEmail], true
|
||||
);
|
||||
} catch (\Throwable $e) {
|
||||
throw new ClientException(Notifications::AccountSwitchFailed, $e);
|
||||
}
|
||||
if (!$oAccount) {
|
||||
throw new ClientException(Notifications::AccountSwitchFailed);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue