mirror of
https://github.com/Bubka/2FAuth.git
synced 2025-06-19 19:28:08 +02:00
Add log for debug
This commit is contained in:
parent
558fd4d9ea
commit
1f9ac91734
@ -454,6 +454,8 @@ class TwoFAccount extends Model implements Sortable
|
||||
$this->algorithm = self::SHA1;
|
||||
$this->period = 30;
|
||||
$this->icon = $this->storeImageAsIcon('https://upload.wikimedia.org/wikipedia/commons/thumb/8/83/Steam_icon_logo.svg/langfr-320px-Steam_icon_logo.svg.png');
|
||||
|
||||
Log::info(sprintf('TwoFAccount configured as Steam account'));
|
||||
}
|
||||
|
||||
|
||||
@ -548,7 +550,7 @@ class TwoFAccount extends Model implements Sortable
|
||||
else {
|
||||
// @codeCoverageIgnoreStart
|
||||
Storage::delete($imageFile);
|
||||
throw new \Exception;
|
||||
throw new \Exception('Unsupported mimeType or missing image on storage');
|
||||
// @codeCoverageIgnoreEnd
|
||||
}
|
||||
|
||||
@ -556,6 +558,7 @@ class TwoFAccount extends Model implements Sortable
|
||||
}
|
||||
// @codeCoverageIgnoreStart
|
||||
catch (\Assert\AssertionFailedException|\Assert\InvalidArgumentException|\Exception|\Throwable $ex) {
|
||||
Log::error(sprintf('Icon storage failed: %s', $ex->getMessage()));
|
||||
return null;
|
||||
}
|
||||
// @codeCoverageIgnoreEnd
|
||||
|
Loading…
x
Reference in New Issue
Block a user