#44147 [Opn]: Introduction of parameterless catch clause
| From: | cool_lim_lp at yahoo dot com dot sg | Date: | Mon, 18 Feb 2008 12:14:41 +0000 |
| Subject: | #44147 [Opn]: Introduction of parameterless catch clause | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-122399@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: Open
Bug Type: Feature/Change Request
Operating System: irrelevant
PHP Version: 5.2.5
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[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