note 129156 added to language.exceptions

From: Date: Thu, 11 Jan 2024 16:08:33 +0000
Subject: note 129156 added to language.exceptions
Groups: php.notes 
Request: Send a blank email to php-notes+get-221110@lists.php.net to get a copy of this message
Be careful with exception handling within a class that has NAMESPACE <?php namespace \my\libs; class foo { function someMethod() { try { make_a_bug(); } catch( Excepcion $e ) { // only catch exception on \my\Libs\Exception namespace } catch( \Excepcion $e ) { // only all global exception without namespace } } } ?> ---- Server IP: 45.112.84.4 Probable Submitter: 45.91.157.134 (proxied: 24.232.82.66) ---- Manual Page -- https://php.net/manual/en/language.exceptions.php Edit -- https://main.php.net/note/edit/129156 Del: integrated -- https://main.php.net/note/delete/129156/integrated Del: useless -- https://main.php.net/note/delete/129156/useless Del: bad code -- https://main.php.net/note/delete/129156/bad+code Del: spam -- https://main.php.net/note/delete/129156/spam Del: non-english -- https://main.php.net/note/delete/129156/non-english Del: in docs -- https://main.php.net/note/delete/129156/in+docs Del: other reasons-- https://main.php.net/note/delete/129156 Reject -- https://main.php.net/note/reject/129156 Search -- https://main.php.net/manage/user-notes.php

« previous php.notes (#221110) next »