Support the ongoing development of Laravel.io →
Security Validation Architecture

Hello guys!

I would like to ask if there is any way to controll a exceptions and finally execute a code

EJ:

try{
   insert a row in a db:
} (Exception e){
   // print in the log (ERROR:DB)
} finally{
   // send a mail
}

Thanks

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

DiegoHeras diegoheras Joined 26 Dec 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.