Search

Laravel Artisan Tinker: The throw-up Command

December 7, 2016 —John Koster

The throw-up command can be used to re-throw an exception out of a Tinker REPL session. By default, it throws the exception that last occurred, but will accept an exception instance as an argument:

1>>> throw new Exception("An example exception.");
2Exception with message 'An example exception.'
3>>> throw-up
4Throwing Exception with message 'An example exception.'
5Exception with message 'An example exception.'