• 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

Any AWS EB Laravel route getting 404 Not Found nginx/1.16.1

Failing validation doesn't stop code execution in livewire component

How to solve cURL error 60: SSL certificate in Laravel 5 while Facebook authentication

Laravel query builder binding parameters more than once

best way to store error messages in Laravel (session or variable)

Docker & Laravel : configure: error: Package requirements (oniguruma) were not met

PHP array_filter with arguments

Facebook PHP SDK - will not logout properly

Unable to run composer install

php curl requesting twice

Transpose and flatten two-dimensional indexed array where rows may not be of equal length

XML to CSV with PHP converter [problem with images grabing]

How to fix 'Data has already been sent to output, unable to output PDF file' in MPDF

php 7 php.ini upload_max_filesize not working

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

About Contact Privacy policy Terms and conditions