• 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

enable Apache http Authorization header

PhP how to calculate moments with variables rows

Is there a way to use Foundry Model for Authentification inside Functional Tests?

How to get variable from JavaScript to PHP [duplicate]

SQL AVG() to 2 decimals

How to fix Call to undefined method AppModelsTableName::factory?

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

Debugging Stripe Webhook Event

how to prevent float variables displaying as scientific notation when printing [duplicate]

How to get AJAX to post on second page?

How to get the ID of the link in another page in php

How to get transaction details in notify_url page in paypal

How do I call a php file with axios?

Stop caching for PHP 5.5.3 in MAMP

Laravel: Create morphs() relationship nullable

About Contact Privacy policy Terms and conditions