mirror of
				https://github.com/firefly-iii/firefly-iii.git
				synced 2025-10-31 02:36:28 +00:00 
			
		
		
		
	Throw errors instead of abort()
This commit is contained in:
		| @@ -4,6 +4,7 @@ declare(strict_types = 1); | ||||
| namespace FireflyIII\Http\Controllers\Auth; | ||||
|  | ||||
| use Auth; | ||||
| use FireflyIII\Exceptions\FireflyException; | ||||
| use FireflyIII\Http\Controllers\Controller; | ||||
| use FireflyIII\Models\Role; | ||||
| use FireflyIII\User; | ||||
| @@ -151,7 +152,7 @@ class AuthController extends Controller | ||||
|  | ||||
|             return redirect($this->redirectPath()); | ||||
|         } | ||||
|         abort(500, 'Not a user!'); | ||||
|         throw new FireflyException('The authenticated user object is invalid.'); | ||||
|  | ||||
|  | ||||
|         return redirect($this->redirectPath()); | ||||
|   | ||||
| @@ -3,6 +3,7 @@ | ||||
| use Amount; | ||||
| use Carbon\Carbon; | ||||
| use Config; | ||||
| use FireflyIII\Exceptions\FireflyException; | ||||
| use FireflyIII\Helpers\Report\ReportQueryInterface; | ||||
| use FireflyIII\Repositories\Account\AccountRepositoryInterface as ARI; | ||||
| use FireflyIII\Repositories\Bill\BillRepositoryInterface; | ||||
| @@ -247,7 +248,7 @@ class JsonController extends Controller | ||||
|     { | ||||
|         $pref = Preferences::get('tour', true); | ||||
|         if (!$pref) { | ||||
|             abort(404); | ||||
|             throw new FireflyException('Cannot find preference for tour. Exit.'); | ||||
|         } | ||||
|         $headers = ['main-content', 'sidebar-toggle', 'account-menu', 'budget-menu', 'report-menu', 'transaction-menu', 'option-menu', 'main-content-end']; | ||||
|         $steps   = []; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user