On 27/04/10 16:37, tedd wrote:
Error handling is almost an art form.
More like a black art - voodoo perhaps...
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Tue, Apr 27, 2010 at 7:34 PM, Gary . php-gene...@garydjones.name wrote:
On Tue, Apr 27, 2010 at 10:46 AM, Peter Lind wrote:
On 27 April 2010 10:42, Gary . wrote:
How do you guys handle errors during, say, db insertions.
Let's say you have an ongoing transaction which fails on the n-th
On 27 April 2010 10:42, Gary . php-gene...@garydjones.name wrote:
How do you guys handle errors during, say, db insertions.
Let's say you have an ongoing transaction which fails on the n-th
insert. Ok, you roll back the transaction, no problem. How do you then
inform the user? Just using the
On 27 April 2010 10:42, Gary . php-gene...@garydjones.name wrote:
How do you guys handle errors during, say, db insertions.
Let's say you have an ongoing transaction which fails on the n-th
insert. Ok, you roll back the transaction, no problem. How do you then
inform the user? Just using the
On Tue, Apr 27, 2010 at 10:42:03AM +0200, Gary . wrote:
How do you guys handle errors during, say, db insertions.
Let's say you have an ongoing transaction which fails on the n-th
insert. Ok, you roll back the transaction, no problem. How do you then
inform the user? Just using the text
On 27 April 2010 15:36, Paul M Foster pa...@quillandmouse.com wrote:
On Tue, Apr 27, 2010 at 10:42:03AM +0200, Gary . wrote:
How do you guys handle errors during, say, db insertions.
Let's say you have an ongoing transaction which fails on the n-th
insert. Ok, you roll back the transaction,
On Tue, Apr 27, 2010 at 10:46 AM, Peter Lind wrote:
On 27 April 2010 10:42, Gary . wrote:
How do you guys handle errors during, say, db insertions.
Let's say you have an ongoing transaction which fails on the n-th
insert. Ok, you roll back the transaction, no problem. How do you then
inform
On Tue, Apr 27, 2010 at 03:41:04PM +0200, Peter Lind wrote:
On 27 April 2010 15:36, Paul M Foster pa...@quillandmouse.com wrote:
On Tue, Apr 27, 2010 at 10:42:03AM +0200, Gary . wrote:
How do you guys handle errors during, say, db insertions.
Let's say you have an ongoing transaction
On 27 April 2010 16:07, Paul M Foster pa...@quillandmouse.com wrote:
On Tue, Apr 27, 2010 at 03:41:04PM +0200, Peter Lind wrote:
On 27 April 2010 15:36, Paul M Foster pa...@quillandmouse.com wrote:
On Tue, Apr 27, 2010 at 10:42:03AM +0200, Gary . wrote:
How do you guys handle errors
On Tue, Apr 27, 2010 at 04:13:20PM +0200, Peter Lind wrote:
On 27 April 2010 16:07, Paul M Foster pa...@quillandmouse.com wrote:
On Tue, Apr 27, 2010 at 03:41:04PM +0200, Peter Lind wrote:
On 27 April 2010 15:36, Paul M Foster pa...@quillandmouse.com wrote:
On Tue, Apr 27, 2010 at
On 27 April 2010 16:24, Paul M Foster pa...@quillandmouse.com wrote:
On Tue, Apr 27, 2010 at 04:13:20PM +0200, Peter Lind wrote:
On 27 April 2010 16:07, Paul M Foster pa...@quillandmouse.com wrote:
On Tue, Apr 27, 2010 at 03:41:04PM +0200, Peter Lind wrote:
On 27 April 2010 15:36, Paul M
Peter Lind wrote:
On 27 April 2010 16:24, Paul M Foster pa...@quillandmouse.com wrote:
On Tue, Apr 27, 2010 at 04:13:20PM +0200, Peter Lind wrote:
On 27 April 2010 16:07, Paul M Foster pa...@quillandmouse.com wrote:
On Tue, Apr 27, 2010 at 03:41:04PM +0200, Peter Lind wrote:
On 27 April
I'm still shocked you guys are still writing code that has errors in it,
what's worse is you know about the errors, and instead of fixing them
you're just telling the user about it!
The point here is that we, programmers, know that we write code with
bugs in it. We are realistic about it,
At 9:36 AM -0400 4/27/10, Paul M Foster wrote:
On Tue, Apr 27, 2010 at 10:42:03AM +0200, Gary . wrote:
How do you guys handle errors during, say, db insertions.
Let's say you have an ongoing transaction which fails on the n-th
insert. Ok, you roll back the transaction, no problem. How do
Teus Benschop wrote:
I'm still shocked you guys are still writing code that has errors in it,
what's worse is you know about the errors, and instead of fixing them
you're just telling the user about it!
The point here is that we, programmers, know that we write code with
bugs in it. We are
At 4:13 PM +0200 4/27/10, Peter Lind wrote:
If only the world consisted of smart users ... I think, however, that
we're generally closer to the opposite. And no, I don't hate users -
I've just seen too many people do things that were very far removed
from smart.
Regards
Peter
Peter et al:
At 10:24 AM -0400 4/27/10, Paul M Foster wrote:
Unfortunately, true. Sometimes I think computer users should be required
to take a course in using a computer before being allowed behind the
keyboard.
Paul
Yeah, like I believe that everyone should do through at least one
divorce before
On Tue, 2010-04-27 at 12:12 -0400, tedd wrote:
At 4:13 PM +0200 4/27/10, Peter Lind wrote:
If only the world consisted of smart users ... I think, however, that
we're generally closer to the opposite. And no, I don't hate users -
I've just seen too many people do things that were very far
At 4:31 PM +0200 4/27/10, Peter Lind wrote:
While I love to rant at stupid users, the truth is probably that
programmers are the ones who should take courses in how users think.
In the end, if I fail to understand my users, it doesn't matter how
great my program is: they'll still fail to use it.
At 4:23 PM +0100 4/27/10, Nathan Rixham wrote:
I'm still shocked you guys are still writing code that has errors in it,
what's worse is you know about the errors, and instead of fixing them
you're just telling the user about it!
:p
Here's my code that doesn't contain errors:
?php
?
On 27 April 2010 18:21, tedd tedd.sperl...@gmail.com wrote:
At 4:31 PM +0200 4/27/10, Peter Lind wrote:
While I love to rant at stupid users, the truth is probably that
programmers are the ones who should take courses in how users think.
In the end, if I fail to understand my users, it
At 5:09 PM +0100 4/27/10, Ashley Sheridan wrote:
Sounds like you've got a few stories that would a lot of people
happy were you to share them on the DailyWTF ;)
Thanks,
Ash
Ash:
Sharing them here is more direct and meaningful to what we do, but I
will investigate what you suggest.
On Tue, Apr 27, 2010 at 12:12:31PM -0400, tedd wrote:
At 4:13 PM +0200 4/27/10, Peter Lind wrote:
If only the world consisted of smart users ... I think, however, that
we're generally closer to the opposite. And no, I don't hate users -
I've just seen too many people do things that were very
At 10:24 AM -0400 4/27/10, Paul M Foster wrote:
Unfortunately, true. Sometimes I think computer users should be
required to take a course in using a computer before being allowed
behind the keyboard.
Paul
I came across a term long ago amidst my readings: PEBKAC
Problem
Exists
Between
Keyboard
On 4/27/10, tedd wrote:
At 4:23 PM +0100 4/27/10, Nathan Rixham wrote:
I'm still shocked you guys are still writing code that has errors in it,
what's worse is you know about the errors, and instead of fixing them
you're just telling the user about it!
:p
Here's my code that doesn't contain
On Tue, Apr 27, 2010 at 12:23 PM, tedd tedd.sperl...@gmail.com wrote:
At 4:23 PM +0100 4/27/10, Nathan Rixham wrote:
I'm still shocked you guys are still writing code that has errors in it,
what's worse is you know about the errors, and instead of fixing them
you're just telling the user
Sorry,
i found the error. it was my mistake
- Original Message
From: It Maq [EMAIL PROTECTED]
To: php-general@lists.php.net
Sent: Tuesday, March 11, 2008 11:38:10 AM
Subject: [PHP] Error handling
Hi,
I need help with a simple script that i made for handling errors. The problem
is
On Mon, August 6, 2007 4:41 am, debussy007 wrote:
I am new to PHP and need some help for error handling.
I read in the docs that i can handle the errors this way in my PhP:
set_error_handler('errorHandler');
function errorHandler($errnum,$errmsg,$file,$lineno){
[...]
}
But does that
debussy007 wrote:
Hi,
I am new to PHP and need some help for error handling.
I read in the docs that i can handle the errors this way in my PhP:
set_error_handler('errorHandler');
function errorHandler($errnum,$errmsg,$file,$lineno){
[...]
}
But does that mean that I have to copy paste
E_USER_WARNING is a 'constant' whose value is a number.
It is not a string.
If you do this:
echo E_USER_WARNING is set to ', E_USER_WARNING, 'br /\n;
you will see exactly what number it is.
So whatever you thought was going wrong, this is not it.
In addition...
The check for $query should
Didja see this one:
http://us3.php.net/manual/en/function.memcache-debug.php
Not, perhaps, the best answer, and maybe even not possible in your
environment, but it may be useful for development, if not production.
You could also check the getServerStats functions to see if their
stats provide
Hi!, u can extend the exception class and handle ur own errors, If u need
help let me know!
Rafa
On 8/31/06, Jay Paulson [EMAIL PROTECTED] wrote:
I've been doing some research and was wondering if anyone out there has
written a library for error handling? I haven't found anything as of yet
On Thu, 2006-08-31 at 11:12 -0500, Jay Paulson wrote:
I've been doing some research and was wondering if anyone out there has
written a library for error handling? I haven't found anything as of yet
but would love to hear suggestions!
PEAR
Cheers,
Rob.
--
I'm curious, what features are you looking for in an error handling library?
2006/8/31, Jay Paulson [EMAIL PROTECTED]:
I've been doing some research and was wondering if anyone out there has
written a library for error handling? I haven't found anything as of yet
but would love to hear
On Wednesday 13 April 2005 08:46, Cima wrote:
hi,
im working with php 4 and postgresql 8 and i would like to know how to
handle certain errors generated. in postgresql, i've written a stored
function that selects a record from a table and in case no record is found
i 'raise an exception'.
Personally, I create a custom error handler for all my apps (currently 4.3.*
compliant). While I normally use Smarty and have separate error templates,
here is a quick example.
function errorHandler($errno, $errstr, $errfile, $errline )
{
print Error #: $errno br/Error Message:
[snip]
I have found some great code that handles errors through
PHP_SELF
However I have radio buttons and drop down selections that I
cannot do a $_POST (the POST only works on my text fields).
Does someone have some sample code that can check for errors on
a drop down selection or radio buttons
On Fri, 2003-10-17 at 16:29, Frank Tudor wrote:
I have found some great code that handles errors through
PHP_SELF
However I have radio buttons and drop down selections that I
cannot do a $_POST (the POST only works on my text fields).
Does someone have some sample code that can check for
Robert Cummings wrote:
Error Handling?? Do you mean form validation? InterJinn does form
validation and allows custom validators for any kind of form field. I
believe PEAR's Quickform can also do similar.
I'm thinking about getting a vasectomy; what does InterJinn recommend?
Seriously, is it
On Fri, 2003-10-17 at 18:49, John W. Holmes wrote:
Robert Cummings wrote:
Error Handling?? Do you mean form validation? InterJinn does form
validation and allows custom validators for any kind of form field. I
believe PEAR's Quickform can also do similar.
I'm thinking about getting a
John W. Holmes wrote:
Robert Cummings wrote:
Error Handling?? Do you mean form validation? InterJinn does form
validation and allows custom validators for any kind of form field. I
believe PEAR's Quickform can also do similar.
I'm thinking about getting a vasectomy; what does InterJinn
On Fri, 2003-10-17 at 23:14, John Nichel wrote:
I had InterJinn Simonize my car this morning. :)
Hmm, that's an odd word to use... I hope your car enjoyed its
simonizing. But don't let it get carried away :)
Cheers,
Rob
--
..
|
Interjinn looks great but my development box is a windows me
machine with easyphp (globals turned off) How am I supposes to
get this stuff to work. I actually just unzipped it to my www
dir and it has been sitting there the whole day.
and I still have my vailidation (form handling) problem.
I
Frank,
http://pear.php.net/HTML_QuickForm
It's that easy. There are full docs accessible from the page listed
above. Average time from download to output of your first form with
validation: 30 minutes to 1 hour. Tops.
Regards,
Greg
Frank Tudor wrote:
I would really be interested in
On Sat, 2003-10-18 at 00:07, Frank Tudor wrote:
Interjinn looks great but my development box is a windows me
machine with easyphp (globals turned off) How am I supposes to
get this stuff to work. I actually just unzipped it to my www
dir and it has been sitting there the whole day.
and I
On Friday 20 June 2003 02:11, Mignon Hunter wrote:
On my dev server the php.ini is set to log all errors and notices.
Isnt there a way to over ride this on a per script basis to output to
stdout (or my browser) ?
Yes, manual Error Handling and Logging Functions
--
Jason Wong - Gremlins
Why not split it into 2 forms? insert, then attach pictures to the record.
Otherwise, decide what's the key issue (imho the a record can exist without
pics, but not vice-versa), and focus on that first.
Justin
on 06/01/03 10:15 PM, Jim ([EMAIL PROTECTED]) wrote:
Hi,
I have the following
Why not split it into 2 forms? insert, then attach pictures to the
record.
Its just not user-friendly enough, I have thought about it though. I think
I'd rather risk the script hitting an error than compromise the
user-friendliness.after all, the chance of a file not saving is
miniscule as
Try this. In your php.ini file:
display_errors = Off
log_errors = On
track_errors = On
Then in your code:
$php_errormsg = false;
ob_start();
... your code ...
if($php_errormsg) {
ob_end_clean(); // Error - discard buffer
echo An error occurred - webmaster notified;
}
On Thursday, April 18, 2002, at 08:53 AM, Julio Nobrega Trabalhando
wrote:
Anyone recommend a good one? I am in need of the following features:
1) Catch any type of errors,
2) Actions like: Show on the screen, log on a file or database, or
email,
3) Different actions for each error
On Tue, 12 Mar 2002, Thomas Edison Jr. wrote:
I want errors reported on a page when the mail()
function for any reason fails to send emails. FOr
example, if there is a malformed email address or
anything, and the mail is not sent, how can i catch
the Error and Display it on the page?
the
In article [EMAIL PROTECTED],
[EMAIL PROTECTED] says...
I want errors reported on a page when the mail()
function for any reason fails to send emails. FOr
example, if there is a malformed email address or
anything, and the mail is not sent, how can i catch
the Error and Display it on the
What warnings are you receiving? Many can be avoided by doing various
checks:
e.g.
if (!isset($some_variable))
...some error code
else
...all is well
others which may be useful:
function_exists()
file_exists()
HTH
Neil
Yoel Benitez Fonseca wrote:
Hi!
There is in PHP some way
Thanks, assert() is cool, but it still reports the filename and line
number of the included file with the function in which the error
occurred, not the script that called the functon with illegal arguments.
Or...???
Eg.:
index.php:
?
include_once(functions.php);
// foo() is declared here
try, assert() instead of echo()ing error messages.
assert('is_object($obj)');
and write your error handler code or use mine :)
or am i missing something?
Papp Gyozo
- [EMAIL PROTECTED]
- Original Message -
From: SafeV [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent:
the PEAR library has an error class
-Stewart.
-Original Message-
From: Boget, Chris [mailto:[EMAIL PROTECTED]]
Sent: 12 April 2001 16:19
To: Php (E-mail)
Subject: [PHP] Error Handling class
I've looked around but haven't really found one...
Does anyone know where I can find a class
On Thu, 15 Feb 2001 11:42, Patrick Brown wrote:
How can I disable the display of error to the browser window from
within the script? I want to do a redirect based on the error and
cannot because header info has already been sent.
Thanks,
Pat
Try an @ prepended to the function that triggers
In article 96faad$h9k$[EMAIL PROTECTED], [EMAIL PROTECTED] ("Patrick
Brown") wrote:
How can I disable the display of error to the browser window from within the
script? I want to do a redirect based on the error and cannot because header
info has already been sent.
Use the "@" sign. Example
OK, I tried the @ symbol. It seemed to just disable error checking
altogether. I have this in my code that I'd like to use.
if (!$php_errormsg) {
header("Location: http://www.domain.com/admin/index.php");
}
else {
header("Location: http://www.domain.com/admin/error.html");
}
"CC Zona" [EMAIL
59 matches
Mail list logo