• 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

How to update array value in Laravel

Laravel Delete and Update

How to show selected value using javascript in laravel

Remove country code from phone number?

backup files to google drive using PHP

How to make a foreign key not using primary key

Confirm Leave on External Links in Wordpress

PHP: How to quickly split a key=value file into associative array

php retrieve specific data onclick from database in a list format

CONCAT columns with Laravel 5 eloquent

Laravel Unknown Column 'updated_at'

How to validate tin and cst using PHP?

Can't find vendor/autoload.php for Ratchet

Shopify password update using Shopify API

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

About Contact Privacy policy Terms and conditions