• 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

How can I stop a symfony process which is listening on http://127.0.0.1:8000

generate an Excel file using PHP

carbon generated datetime not stored correctly into the database

Install mysql client in docker image

PHP: remove filename from path

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

how to use extended ASCII instead of unicode in PHP

How can i call a function that executes an fpdf based on the choice of a form selector?

Printing more than one array using print_r or any other function in php

Zig-zag scan an N x N array

Insert a DIV after the 6th product only once in WooCommerce category archives

how to loop through json response data using ajax jquery?

Set quantity minimum, maximum and step at product level in Woocommerce

google content api for shopping

How to fix " Uncaught TypeError: Argument 1 passed to JpGraphException::defaultHandler() " problem in php 7.1.3 and jpgraph 4.2.6?

About Contact Privacy policy Terms and conditions