Skip to main content

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

  • 24763
  • Created Jul 2017
  • Updated Apr 2026

Files in this example

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

pterodactyl/panel

  • 8951
  • Created Dec 2016
  • Updated Jun 2026

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

  • 2391
  • Created Dec 2017
  • Updated Jun 2026

Files in this example

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

iluminar/goodwork

  • 2229
  • 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

  • 510
  • Created May 2023
  • Updated Aug 2024

Files in this example

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

jcergolj/laravellte

  • 215
  • Created Jan 2020
  • Updated Feb 2023

Files in this example

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

theihasan/geezap

  • 124
  • Created Jun 2024
  • Updated Mar 2026

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