Closed diegocaprioli closed 7 years ago
It would appear that TokenMismatchException
extends Exception
instead of ErrorException
. With Exception
being the base class of all exceptions I'm a little hesitant to just swallow them all but I suppose our custom whoops screen is better than the generic one. Let's go ahead and just change the line to if ( $e instanceof Exception )
and update the use
headers. We might consider with 1.0 to create a more standard way of handling TokenMistmatchException
s by redirecting to the previous screen to refresh the token vs. even seeing the error.
@diegocaprioli did you ever make this change?
Fixed in 0.6
I had issues in some projects with the standard and ugly "Whoops" error page when the TokenMismatchException is thrown, in non debug mode. I could easily achieve the desired effect of displaying the proper page by replacing this line: https://github.com/esensi/core/blob/0.6/src/Exceptions/Handler.php#L146
with:
Just wanted to make sure this is ok or I'm missing something here?