Skip to main content

Black Friday 2025! Only until December 1st: coupon FRIDAY25 for 40% off Yearly/Lifetime membership!

Read more here

Code Examples of custom exceptions

Discover how to use Laravel's custom exceptions method in real-world applications. Browse 8 examples from popular open-source projects.

8 examples

monicahq/monica

  • 23656
  • Created Jul 2017
  • Updated Nov 2025

Files in this example

  • app/Exceptions/FileNotFoundException.php
    • app/Services/Account/Settings/DestroyAllDocuments.php
View full example

pterodactyl/panel

  • 8314
  • Created Dec 2016
  • Updated Nov 2025

Files in this example

  • app/Exceptions/Http/HttpForbiddenException.php
    • app/Http/Controllers/Api/Client/Servers/WebsocketController.php#L58
View full example

HDInnovations/UNIT3D-Community-Edition

  • 2239
  • Created Dec 2017
  • Updated Nov 2025

Files in this example

  • app/Exceptions/TrackerException.php
    • app/Http/Controllers/AnnounceController.php
View full example

iluminar/goodwork

  • 2227
  • Created Nov 2017
  • Updated Nov 2025

Files in this example

  • app/Base/Exceptions/UserIsAlreadyMember.php
    • app/Base/Http/Controllers/MemberController.php
View full example

protonemedia/eddy-server-management

  • 507
  • Created May 2023
  • Updated Aug 2024

Files in this example

  • app/Models/PendingDeploymentException.php
    • app/Models/Site.php
View full example

jcergolj/laravellte

  • 216
  • Created Jan 2020
  • Updated Feb 2023

Files in this example

  • app/Exceptions/MissingModel.php
    • app/Services/ForRouteGate.php
View full example

theihasan/geezap

  • 97
  • Created Jun 2024
  • Updated Nov 2025

Files in this example

  • app/Exceptions/ApiKeyNotFoundException.php
    • app/Jobs/GetJobData.php
View full example

caneara/tipsea

  • 13
  • Created Dec 2022
  • Updated Dec 2022

Files in this example

  • app/Exceptions/TooManyRequestsException.php
    • app/Kernels/Exception.php
View full example

We'd Love Your Feedback

Tell us what you like or what we can improve

Feel free to share anything you like or dislike about this page or the platform in general.