On Thu, August 9, 2007 11:50 am, Peter Pan wrote:
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
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
Peter,
you are doing something called swallowing the exception. it may make sense
for your application to
continue processing if the closeCallTracker method throws an error, but at a
minimum you should
log the details of the exception so that you know why its occurring;
something like:
try {
is a great idea, but not realistic given
the amount of times this function is called.
Thank you for your help! I'll update the list with my findings.
-ec
From: Nathan Nobbe [EMAIL PROTECTED]
To: Peter Pan [EMAIL PROTECTED]
CC: php-general@lists.php.net
Subject: Re: [PHP] Exceptions
Date: Thu, 9
Thanks.
Does anybody else have any input? Not to be pushy, but I'm in the
middle of programming a framework for a site.
- Craige
On 1/5/07, Paul Scott [EMAIL PROTECTED] wrote:
On Fri, 2007-01-05 at 00:44 -0500, Craige Leeder wrote:
The question is: How much is too much. Should I use
# [EMAIL PROTECTED] / 2007-01-07 13:17:23 -0500:
On 1/5/07, Paul Scott [EMAIL PROTECTED] wrote:
On Fri, 2007-01-05 at 00:44 -0500, Craige Leeder wrote:
The question is: How much is too much. Should I use Exceptions to
handle all of my error reporting/triggering? How about catching them?
I
PHP Mailing List Listeners,
My question to you is about PHP 5's exception handling. I have looked
at it for a while, but never REALLY used it.
The question is: How much is too much. Should I use Exceptions to
handle all of my error reporting/triggering? How about catching them?
I mean, if I'm
On Fri, 2007-01-05 at 00:44 -0500, Craige Leeder wrote:
The question is: How much is too much. Should I use Exceptions to
handle all of my error reporting/triggering? How about catching them?
I mean, if I'm using Exceptions for all of my error handling, I could
easily end up wrapping my
This one time, at band camp, John Meyer [EMAIL PROTECTED] wrote:
I have the following script:
try {
$conn = mysql_connect(localhost,webuser,testme) or die(Could not
connect);
-- snipped for sake of sanity --
I think if you wish to push down this path you may wish to look at PDO.
I have the following script:
try {
$conn = mysql_connect(localhost,webuser,testme) or die(Could not
connect);
mysql_select_db(bookcollection,$conn) or die(Could not select
database);
//first, check to see if there is an author
if ($_POST[neworoldauthor] == new) {
$sql =
do you know what a php exception is and when/where/what generates them?
(if your coming from another language that supports exceptions you may need
to adjust your knowledge - php's exceptions are a little different -
for instance they are not ever generated by the engine itself)
does
, depending on how that big flame-war in
Internals work[s|ed] out...
You need to do your own 'throw' if you want your 'catch' to execute,
almost for sure.
Disclaimer: Ain't never used PHP Exceptions, and don't like 'em, so I
don't really know what I'm talking about.
--
Like Music?
http://l-i
Hello Jochem,
lookup the archieves. We have long ago decided agains that.
marcus
Friday, August 5, 2005, 2:26:04 PM, you wrote:
Dear Internals,
class FooBar { public function foo() throws Exception {} }
function fooFoo() throws Exception {}
this came up on php-generals and I
Marcus Boerger wrote:
Hello Jochem,
lookup the archieves. We have long ago decided agains that.
I'll take your word on it. :-) (shame on me for not searching harder
before asking)
thanks for replying.
marcus
Friday, August 5, 2005, 2:26:04 PM, you wrote:
Dear Internals,
class
If there is a class with a function, that might throw exceptions and
does NOT catch them, may I write that like in Java?
class FooClass {
public function foo() throws Exception {
}
}
Or is there another possibility to tell a function throws an exception
and to force the
Norbert Wenzel wrote:
If there is a class with a function, that might throw exceptions and
does NOT catch them, may I write that like in Java?
class FooClass {
public function foo() throws Exception {
}
}
Or is there another possibility to tell a function throws an
Torgny Bjers wrote:
The Java way doesn't work here. The best approach would be to simply run
a try/catch/finally around the call to your function/method, and inside
the function itself you do the following:
if (...) { throw new Exception(My message.); } }
Hello Torgny,
Thanky you for your
Dear Internals,
class FooBar { public function foo() throws Exception {} }
function fooFoo() throws Exception {}
this came up on php-generals and I wondered if anyone had time/cared
to comment if it (as it does to me) seems like a good idea and/or whether it is
technically feasable. My
Matthew Sims wrote:
Nice, that makes it easier on the eyes to read.
--Matthew Sims
--http://killermookie.org
Matthew's point is probably that you have hijacked a thread - best way
to make sure that you DO NOT get an answer to your question. Please read
the posting guidlines for this list and
public function execute($query) {
if (!$this-dbh) {
$this-connect();
}
// My $query has quotes in it
// I try to escape the quotes
$query = mysql_escape_string($query);
// It causes an error
$ret = mysql_query($query, $this-dbh);
if (!$ret) {
// An Exception error is thrown
throw new Exception;
} elseif (!is_resource($ret)) {
return TRUE;
} else {
$statment = new DB_MysqlStatement($this-dbh, $query);
return $statement;
}
Fatal
If I understand right, PHP5 has an exception
handling mechanism but it is only for manual using, i.e.
a programmer can use try/catch but only for own code.
PHP's built-in functions and functions from extensions still
use old return value method. Yes?
--
PHP General Mailing List
[EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
If I understand right, PHP5 has an exception
handling mechanism but it is only for manual using, i.e.
a programmer can use try/catch but only for own code.
PHP's built-in functions and functions from extensions still
use old
Builtin functions in php5 will not throw exceptions. The basic idea is that
exceptions are part of the OOP portion of PHP. What you will need to do is
to wrap these functions into classes. Fortunately, many existing class
libraries such as PEAR can be tweaked to throw exceptions with little or
The exception mechanism will not replace trigger_error() or function
return values any time soon
Greg
Tumurbaatar S. wrote:
[EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
If I understand right, PHP5 has an exception
handling mechanism but it is only for manual using, i.e.
a
If I understand right, PHP5 has an exception
handling mechanism but it is only for manual using, i.e.
a programmer can use try/catch but only for own code.
PHP's built-in functions and functions from extensions still
use old return value method. Yes?
--
PHP General Mailing List
26 matches
Mail list logo