(re)throwing exceptions

From: Date: Sat, 06 Aug 2005 15:19:35 +0000
Subject: (re)throwing exceptions
Groups: php.internals 
Request: Send a blank email to internals+get-17561@lists.php.net to get a copy of this message
Hi Folks! What do you think about re-throwing an Exception? I think of a situation when writing a complex framework and one call on a lower hierachy level throws an Exception, the higher levels should be able to get to know. If I have to catch it on a higher level, I can't leave the caught Exception as is just adding my current context to the stack trace. Sometimes you need something like that. VB.NET for example allows you something like: Public Sub foo() Try ... Catch e AS NastyException ... throw End Try End Sub Best Regards Dennis Sterzenbach

« previous php.internals (#17561) next »