Peeps,
I'm having an issue where throwing Exceptions are displaying a blank page
even though the Exception is being caught in a try...catch statement. This
is happening on our production server where warnings, errors, exceptions,
etc. are not to be displayed to the user. The assumption is that even
though an Exception is being thrown it should be caught rather than
displaying a blank page. Is there a specific configuration variable that
needs to be set in php.ini to allow warnings to not be displayed but
Exceptions to still be caught? Or is this just a bug? Here is some code
that replicates the issue:
try {
closeCallTracker($appId, $salesRepId);
} catch (Exception $e) {
// No need to display anything to user if call tracker is not closed
}
function closeCallTracker($appId, $salesRepId) {
// Some code here...
// A pretty near example of why the Exception is being thrown in our
system
if ($callTrackerAlreadyClosed) {
throw new Exception('Can not close a call tracker that has already
been closed.');
}
}
I'm expecting the program to continue as normal as the Exception has been
caught appropriately... but instead this code is displaying a blank page.
We're using PHP: 5.1.2 on SuSe
This is really a bizarre issue and any help would be greatly appreciated.
I've searched PHP.net and Google far too long on this issue. Thank you in
advance.
-ec
_________________________________________________________________
Learn.Laugh.Share. Reallivemoms is right place!
http://www.reallivemoms.com?ocid=TXT_TAGHM&loc=us
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php