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.'

Some absolutely amazing
people

The following amazing people help support this site and my open source projects ♥️
If you're interesting in supporting my work and want to show up on this list, check out my GitHub Sponsors Profile.