Back

image
𝗧𝗶𝗽 𝗼𝗳 𝗧𝗵𝗲 𝗗𝗮𝘆 𝗳𝗼𝗿 𝗟𝗮𝗿𝗮𝘃𝗲𝗹𝗶𝗮𝗻𝘀❤️
Do you know...!!
𝗧𝗵𝗲𝗿𝗲'𝘀 𝗻𝗼 𝗻𝗲𝗲𝗱 𝘁𝗼 𝘂𝘀𝗲 𝘁𝗵𝗲 "𝘁𝗿𝘆-𝗰𝗮𝘁𝗰𝗵" 𝗯𝗹𝗼𝗰𝗸 𝗶𝗻 𝘆𝗼𝘂𝗿 𝗟𝗮𝗿𝗮𝘃𝗲𝗹 𝗔𝗽𝗽𝘀 because Laravel has its own built-in 𝗛𝗮𝗻𝗱𝗹𝗲𝗿 𝗰𝗹𝗮𝘀𝘀 to control global exceptions from a single class. In Laravel 10 & below it lives under "𝗮𝗽𝗽\𝗘𝘅𝗰𝗲𝗽𝘁𝗶𝗼𝗻𝘀" directory.

𝟏. 𝐖𝐡𝐚𝐭 𝐢𝐬 𝐇𝐚𝐩𝐩𝐞𝐧𝐢𝐧𝐠?
𝗿𝗲𝗴𝗶𝘀𝘁𝗲𝗿(): The default method to register all reportable() & renderable() exceptions.

𝗿𝗲𝗻𝗱𝗲𝗿𝗮𝗯𝗹𝗲(): A built-in method to render a response when a specific exception is caught.

𝗧𝗵𝗿𝗼𝘄𝗮𝗯𝗹𝗲: Any throwable exception that can occur in your application.

𝟐. 𝐔𝐬𝐞 𝐂𝐚𝐬𝐞
If you are working on a large application & you don't want to add "try-catch" block everywhere to keep your code clean & maintainable then you can use the power of Laravel Handler class.

34

  • No matching results...
  • Searching...

/ 1000