More consistent error handling.

This commit is contained in:
James Cole
2016-02-06 05:01:34 +01:00
parent 69d0c31ae5
commit 241190c4da
7 changed files with 25 additions and 24 deletions

View File

@@ -1,6 +1,7 @@
<?php namespace FireflyIII\Http\Controllers;
use Carbon\Carbon;
use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Helpers\Report\ReportHelperInterface;
use FireflyIII\Models\Account;
use FireflyIII\Repositories\Account\AccountRepositoryInterface as ARI;
@@ -83,8 +84,7 @@ class ReportController extends Controller
{
// throw an error if necessary.
if ($end < $start) {
return view('error')->with('message', 'End date cannot be before start date, silly!');
throw new FireflyException('End date cannot be before start date, silly!')
}
// lower threshold