• 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 to validate tin and cst using PHP?

How in Laravel run JavaScript code stored in php variable?

Redis Command To Sort Keys

calling server using nusoap with complextype

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

Execute only one time and then wait set period of time before executing again

str_replace or preg_replace random number from string

Add Class in html Dynamically in PHP

Magento 2 - How to add new block to admin panel in product page?

Can we define variables in `.tpl` files?

how to check version of codeigniter framework?

Wordpress add responsive srcset header image to theme

how do i retrieve and display the alt text of an image in wordpress?

Is there a way to use the same parameter into multiple place in the same query with Eloquent? [duplicate]

PHP drop down list using array's and foreach (else and for) code

About Contact Privacy policy Terms and conditions