• 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

Calculating Median of an array in PHP

Inserting data into SQL Server Db An Invalid direction was specified

Applying programmatically a coupon to an Order in WooCommerce3

How update php.ini on a Mac OS X Mojave?

PHP function Not Working As Expected From functions.php Include File

Laravel PHP: multiple project run at the same time [closed]

Custom post type single page not working

Transpose and flatten two-dimensional indexed array where rows may not be of equal length

How do I truncate a decimal in PHP?

laravel 5.6 bulk inserting json data

Cache clear probem in Larave

Laravel/docker-compose/redis - Class 'Redis' not found

how to create html table in php

Cant seem to get the Pagination to work on my WooCommerce REST API application?

Failed user login on production server using Symfony framework (Authentication request could not be processed due to...)

About Contact Privacy policy Terms and conditions