• 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

Converting array to string and then back in PHP

How to loop a tree array with unknown depth and get array blocks?

Sum array values

Can we define variables in `.tpl` files?

Add record for each array elements if missing in table

How do I set the maximum php memory limit

Create tags in laravel post publishing

I want to use codeigniter foreign character library in my custom PHP project how i can use it?

Return multiple values from a function using mysqli_fetch_assoc [closed]

Open a popup box after receiving result from ajax

Symfony - EasyAdmin - Add and remove functions are ignored from AssociationField

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

PHPSpreadsheet - How Do I Use Auto Migration Tool

Saving Data from form to database using AngularJS and php

PHP Find Array Index value in multi-line array

About Contact Privacy policy Terms and conditions