Skip to main content

Search Results for "custom exceptions"

We found 12 results for "custom exceptions".

Tutorial 7 min read Free

Laravel Exceptions: How to Catch, Handle and Create Your Own

Quite often web-developers don't care enough about errors. If something goes wrong, you often see default Laravel texts like "Whoops, something went wrong" or, even worse, the exception code, which is not helpful at all to the visitor. So I decided to write a step-by-step article of how to handle errors in elegant way and present proper error information to the visitor.

Code Example monicahq/monica

monicahq/monica

Files in the example:

  • app/Exceptions/FileNotFoundException.php
  • app/Services/Account/Settings/DestroyAllDocuments.php

Code Example pterodactyl/panel

pterodactyl/panel

Files in the example:

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

Code Example caneara/tipsea

caneara/tipsea

Files in the example:

  • app/Exceptions/TooManyRequestsException.php
  • app/Kernels/Exception.php