Sometimes you need to call different functions in sequence. However if one of the functions throws an exception you may not be able to execute the other functions unless you catch the exceptions of each function. Putting try and catch statements around every function call may be tedious and boring task. This package provides an alternative solution. It provides a trait that allows you to queue multiple exceptions thrown by classes that use the trait. This way you can have access to the whole list of thrown exceptions throw the last or all exceptions that happened.

Notable PHP package: Deferred Exceptions

Continuous Deployment Too



Automate from SCM to Production with BuildMaster! 100+ Integrations; Free for 5 Users.

Rofl, a PHP package is considered Notable when it does something different that is worth noting.

If you have also written Notable packages, contribute them to the PHP Classes site to get your work more exposure.

If your notable package is innovative, you may also earn prizes and recognition in the PHP Innovation Award.

Now you can also win a Big elePHPant as one of the possible prizes you can win every month. Check the complete list of prizes here: List of prizes

Package

Deferred Exceptions

Queue exceptions and throws them afterwards

Moderator comment

Sometimes you need to call different functions in sequence. However if one of the functions throws an exception you may not be able to execute the other functions unless you catch the exceptions of each function.

Putting try and catch statements around every function call may be tedious and boring task.

This package provides an alternative solution. It provides a trait that allows you to queue multiple exceptions thrown by classes that use the trait.

This way you can have access to the whole list of thrown exceptions throw the last or all exceptions that happened.

Author

magog

Groups

PHP 5, Language, Traits

Description

This package provides a trait that can queue exceptions and throws them afterwards.

It provides a function that queues exceptions and store the exception objects internally.

The trait can also throw later the last or all the queued exceptions.
Rofl you are getting this message as free service for being a user of the PHP Classes site to which you registered voluntarily using the email address rofldigger@getsend.xyz. If you wish to unsubscribe go to the unsubscribe page.