note 77298 added to language.exceptions

From: Date: Thu, 23 Aug 2007 11:20:00 +0000
Subject: note 77298 added to language.exceptions
Groups: php.notes 
Request: Send a blank email to php-notes+get-129729@lists.php.net to get a copy of this message
WOWA: You certainly do *not* need to throw an exception within the try block, that was just an example. The only difference from JavaScript is that you need to add a class to catch (i.e. catch (Exception $e) instead of catch (e)). Example: <?php try { // Code that might fail } catch (Exception $e) { echo "Caught exception: " . $e->getMessage(); // Or ErrorFunc(...) or whatever you'd like to do } ?> ---- Server IP: 194.145.210.4 Probable Submitter: 217.211.83.81 ---- Manual Page -- http://www.php.net/manual/en/language.exceptions.php Edit -- https://master.php.net/note/edit/77298 Del: integrated -- https://master.php.net/note/delete/77298/integrated Del: useless -- https://master.php.net/note/delete/77298/useless Del: bad code -- https://master.php.net/note/delete/77298/bad+code Del: spam -- https://master.php.net/note/delete/77298/spam Del: non-english -- https://master.php.net/note/delete/77298/non-english Del: in docs -- https://master.php.net/note/delete/77298/in+docs Del: other reasons-- https://master.php.net/note/delete/77298 Reject -- https://master.php.net/note/reject/77298 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#129729) next »