• 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

Codeigniter, Severity: error --> Exception: Too few arguments to function, admin dashboard shows HTTP error 500

cakephp save drag and drop list order to database

php mysql + create a friend request system

Passing a boolean value from checkbox in Laravel form

No definition found for function in vendor vscode

Laravel csrf token mismatch for ajax POST Request

How to render html from a @foreach loop in a textarea

Laravel database insert with combining array and string

Assets not referencing to public folder (Laravel)

Why does using salted hash on python and php give me different results?

PHP Startup: Unable to load dynamic library 'openssl' in Ubuntu

php curl requesting twice

NGINX: connect() to unix:/var/run/php7.2-fpm.sock failed (2: No such file or directory)

PHP echo values of all sub keys [duplicate]

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

About Contact Privacy policy Terms and conditions