• 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

Using PHP to connect to a remote MSSQL database

Message: Set sys_temp_dir in your php.ini after installed composer

run a query using EXECUTE BLOCK to prepair a column for an unique-Index

How to display MySQL table using php and edit it in a web browser

php mysql + create a friend request system

WordPress + Nginx on non-standard port behind AWS ELB results in broken links

Parsing JSON File to array in PHP

Sentry + Laravel: how to log an already catched Exception?

PHP/HTML: Creating A SubMenu

PHP my timezone is no setting up in PHP.ini File in xampp

How to upload mpdf file after generating to s3 bucket in php

No definition found for function in vendor vscode

Laravel websockets AWS EC2 - Connection failed

Add and update products to session cart in Laravel

MySQL - Connection failed: No route to host

About Contact Privacy policy Terms and conditions