diff options
author | Christopher Ng <chrng8@gmail.com> | 2022-04-13 20:02:25 +0300 |
---|---|---|
committer | Christopher Ng <chrng8@gmail.com> | 2022-04-13 20:02:25 +0300 |
commit | 0924271abe084870ee3c51dd3de0fae46b06a8cc (patch) | |
tree | 75b9e9980e9635affc8ca05737fab37af7ac8518 /apps/settings/lib | |
parent | 78c8e578966e3867f583ca3a2aacda583c5ecfbd (diff) |
Catch avatar export separately for better failure tracing
Signed-off-by: Christopher Ng <chrng8@gmail.com>
Diffstat (limited to 'apps/settings/lib')
-rw-r--r-- | apps/settings/lib/UserMigration/AccountMigrator.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/apps/settings/lib/UserMigration/AccountMigrator.php b/apps/settings/lib/UserMigration/AccountMigrator.php index 32cf898f2bc..7b60a101cee 100644 --- a/apps/settings/lib/UserMigration/AccountMigrator.php +++ b/apps/settings/lib/UserMigration/AccountMigrator.php @@ -77,7 +77,11 @@ class AccountMigrator implements IMigrator { try { $account = $this->accountManager->getAccount($user); $exportDestination->addFileContents(AccountMigrator::PATH_ACCOUNT_FILE, json_encode($account)); + } catch (Throwable $e) { + throw new AccountMigratorException('Could not export account information', 0, $e); + } + try { $avatar = $this->avatarManager->getAvatar($user->getUID()); if ($avatar->isCustomAvatar()) { $avatarFile = $avatar->getFile(-1); @@ -87,7 +91,7 @@ class AccountMigrator implements IMigrator { $exportDestination->addFileAsStream($exportPath, $avatarFile->read()); } } catch (Throwable $e) { - throw new AccountMigratorException('Could not export account information', 0, $e); + throw new AccountMigratorException('Could not export avatar', 0, $e); } } |