Add some logging for #283

This commit is contained in:
James Cole 2016-08-05 21:50:49 +02:00
parent b1dfb5811f
commit 7035600984

View File

@ -15,7 +15,7 @@ use Crypt;
use FireflyIII\Exceptions\FireflyException;
use Illuminate\Contracts\Encryption\DecryptException;
use Illuminate\Database\Eloquent\Model;
use Log;
/**
* FireflyIII\Models\Preference
*
@ -54,6 +54,7 @@ class Preference extends Model
try {
$data = Crypt::decrypt($value);
} catch (DecryptException $e) {
Log::error('Could not decrypt preference.', ['id' => $this->id,'name' => $this->name,'data' => $this->data]);
throw new FireflyException('Could not decrypt preference #' . $this->id . '.');
}