• 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

Adding the custom page with add_menu_page function on Wordpress

yii2 and mssql insert varbinary into model

Elastic Beanstalk with Laravel Envoy

Symfony process run throws exception - executing on command line works

PHP AWS Cognito 'Error executing "SignUp" : ResourceNotFoundException : User pool client XXXX does not exist

How to loop sql table data inside a html table

Loading data from MySQL and populating dropdown select with jQuery Mobile, PHP

how to check version of codeigniter framework?

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

PHPS source file - 403 Forbidden You don't have permission to access this resource

Laravel Database Strict Mode

Symfony 4: how to allow dynamic values for array nodes in bundle configuration?

Sagepay Error The Vendor failed to provide a RedirectionURL

advanced custom fields wordpress custom class

Entity provider not working in security.yml php symfony3.4 ({"code":401,"message":"bad credentials"}.)

About Contact Privacy policy Terms and conditions