• Categories
    • PHP
    • phpMyAdmin
    • PHPMailer
    • FFMpeg
    • PHPEXcel
    • PHPDoc
    • PHPUnit
    • CakePHP
    • CakePHP 2.0
    • Cake PHP 2.1
    • CakePHP Model
    • Facebook PHP SDK
    • composer-php
    • PHP 7
    • PHP GD
    All Categories
  • About

Why isn't my PHP exception working?

phpexception-handling


PHP Snippet 1:

<?php

namespace Foo\Bar;

try {
   // ...
} catch (Exception $e) { // This is trying to catch Foo/Bar/Exception
   // ...
}

PHP Snippet 2:

try {
    // ...
} catch (\Exception $e) {
    // ...
}

Related Snippets

Debugging Stripe Webhook Event

Live search query using JS and PHP for QA forum

Return new collection without modifying original collection

dompdf and img tag, image wont show

find in set in laravel ? example

PhP how to calculate moments with variables rows

Android Volley getParams() method not getting called for JsonObjectRequest

ConstraintViolationListInterface to Exception in Symfony

PHP Startup Unable to load dynamic library /usr/lib/php/20151012/php_mysqli.dll

Unable to guess the mime type as no guessers are available Laravel 5.2

stay with the last 15 elements of an array [duplicate]

Cannot retrieve error message using Symfony HttpClient if the response is not "ok"

how to get value from array in laravel

How to get the survey List from surveygizmo API in the Postman?(Trial Version)

Auto increment id JSON

About Contact Privacy policy Terms and conditions