• 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

Natural ORDER in Laravel Eloquent ORM

PHP sort array of objects by two properties

How to add automatically collapse/expand in content wordpress (single.php)?

Laravel after login Two factor not working

Appending data to an anchor tag

Laravel 5.2: Unable to locate factory with name [default]

wordpress function breaks wp-admin

PHP if in_array() how to get the key as well?

AJAX call fails with SyntaxError: Unexpected end of JSON input

Select option menu read from database and use it's values

Getting output of MS stored procedure on php call

How to KeyBy where multiple items have the same key

Laravel views are showing from cache on one server but works fine on other server

How to test laravel controller method?

PHP mail sending empty mails

About Contact Privacy policy Terms and conditions