Display message about common error.

This commit is contained in:
James Cole
2016-10-26 06:41:50 +02:00
parent a7e5fcc806
commit 01de147900

View File

@@ -58,9 +58,12 @@ class Preference extends Model
$data = Crypt::decrypt($value); $data = Crypt::decrypt($value);
} catch (DecryptException $e) { } catch (DecryptException $e) {
Log::error('Could not decrypt preference.', ['id' => $this->id, 'name' => $this->name, 'data' => $value]); Log::error('Could not decrypt preference.', ['id' => $this->id, 'name' => $this->name, 'data' => $value]);
throw new FireflyException('Could not decrypt preference #' . $this->id . '.'); throw new FireflyException(
sprintf('Could not decrypt preference #%d. If this error persists, please run "php artisan cache:clear" on the command line.', $this->id)
);
} }
return json_decode($data); return json_decode($data);
} }