• 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

PHP/HTML: Creating A SubMenu

Can't call javascript alert alertify library from PHP

How to make dot match newline characters using regular expressions

ldap is missing from system when installing adldap2 in laravel

enroll_table three field fetch to payment form to create payment field in laravel 5.5

PHP array slice from position + attempt to return fixed number of items

woocommerce_wp_select options array from product attribute terms

Move a child array to parent array and change parent/child name

I want to store data in new index as per my key in php [duplicate]

add uri parameter to Route name in laravel

How to give apache permission to write to home directory?

Can I use a WooCommerce function without any WooCommerce page?

Laravel phpunit test failing authorization

Toggle between a textbox and a select using PHP

renameColumn migration fails for existing column with columns does not exist error

About Contact Privacy policy Terms and conditions