#44147 [Bgs]: Introduction of parameterless catch clause

From: Date: Thu, 21 Feb 2008 01:17:16 +0000
Subject: #44147 [Bgs]: Introduction of parameterless catch clause
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-122532@lists.php.net to get a copy of this message
ID: 44147 User updated by: cool_lim_lp at yahoo dot com dot sg Reported By: cool_lim_lp at yahoo dot com dot sg Status: Bogus Bug Type: Feature/Change Request Operating System: irrelevant PHP Version: 5.2.5 New Comment: its a convenience in the language Previous Comments: ------------------------------------------------------------------------ [2008-02-18 22:04:55] johannes@php.net A notice in some editor is no reason to change the language. ------------------------------------------------------------------------ [2008-02-18 12:14:40] cool_lim_lp at yahoo dot com dot sg i know it can be done using: try { ... do something ... } catch (Exception $e) { echo 'error'; } but the thing is: i don't need the $e variable and in the Zend Studio, it keeps telling me that the $e variable is not used. ------------------------------------------------------------------------ [2008-02-18 12:12:00] cool_lim_lp at yahoo dot com dot sg Description: ------------ Feature request: is it possible to introduce the following type of 'catch' clause that is commonly available in OOP langs: try { ... do something ... } catch /*Catch all exceptions. We don't need to know what is it.*/ { echo 'Error'; } one reminder is that do remember to destroy the exception object that is thrown although it is not caught in a parameter. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=44147&edit=1

« previous php.bugs (#122532) next »