• 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

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

PHP how to detect if running on arm64 cpu?

Custom API and cunsuming in php?

Put content of wordpress page inside div

How do I get friend list from Friends table with counts of friends of my friends

Laravel Database Strict Mode

Dropdown with current value from Mysql

Filter WooCommerce related products by Polylang language

Yii2 select2 database exception number of bound variables does not match number of tokens

Auto increment id JSON

Display the default discounted price and percentage on Woocommerce products

Laravel 5 controller sending JSON integer as string

Docker & Laravel : configure: error: Package requirements (oniguruma) were not met

php echo xml documents with header

backup files to google drive using PHP

About Contact Privacy policy Terms and conditions