PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
fastfingertips
Forum Contributor
Posts: 242 Joined: Sun Dec 28, 2003 1:40 am
Contact:
Post
by fastfingertips » Fri Jun 04, 2004 8:33 am
I'm building a new error class and i need to create generic error list. Unfortunatelly for me i have a bad imagination and i could not find more then three:
Code: Select all
<?php
$this->errIndex[0]="Database Server Error.";
$this->errIndex[1]="Incorrect Parameter Format.";
$this->errIndex[2]="Incorrect Parameter Received.";
?>
Can you help me with more error messages please?
Joe
Forum Regular
Posts: 939 Joined: Sun Feb 29, 2004 1:26 pm
Location: UK - Glasgow
Post
by Joe » Fri Jun 04, 2004 11:00 am
$this->errIndex[0]="Database Server Error.";
$this->errIndex[1]="Incorrect Parameter Format.";
$this->errIndex[2]="Incorrect Parameter Received.";
$this->errIndex[3]="Incorrect Syntax.";
$this->errIndex[4]="Command not supported";
$this->errIndex[5]="Undefined variable set";
$this->errIndex[6]="Unexpected char";
Hmm not sure what you mean entirely but I was bored so hey, lol
Saethyr
Forum Contributor
Posts: 182 Joined: Thu Sep 25, 2003 9:21 am
Location: Wichita, Kansas USA
Contact:
Post
by Saethyr » Fri Jun 04, 2004 11:12 am
$this->errIndex[0]="Database Server Error.";
$this->errIndex[1]="Incorrect Parameter Format.";
$this->errIndex[2]="Incorrect Parameter Received.";
$this->errIndex[3]="Incorrect Syntax.";
$this->errIndex[4]="Command not supported";
$this->errIndex[5]="Undefined variable set";
$this->errIndex[6]="Unexpected char";
Code: Select all
$this->errIndex[7]="Undefined Function";
$this->errIndex[8]="Unknown Error"; //Default Error type if using a switch
Joe
Forum Regular
Posts: 939 Joined: Sun Feb 29, 2004 1:26 pm
Location: UK - Glasgow
Post
by Joe » Fri Jun 04, 2004 11:17 am
I like the last array element you have there Saethyr, lol Now why didn't i think of that!
markl999
DevNet Resident
Posts: 1972 Joined: Thu Oct 16, 2003 5:49 pm
Location: Manchester (UK)
Post
by markl999 » Fri Jun 04, 2004 11:32 am
Code: Select all
$this->errIndex[9]="You Suck"; //generic error
dull1554
Forum Regular
Posts: 680 Joined: Sat Nov 22, 2003 11:26 am
Location: 42:21:35.359N, 76:02:20.688W
Post
by dull1554 » Fri Jun 04, 2004 11:32 am
i got the best one ever.....
Code: Select all
$this->errIndex[9]="PHP is being gay as all hell, go find a hammer and throw at server.....";
Joe
Forum Regular
Posts: 939 Joined: Sun Feb 29, 2004 1:26 pm
Location: UK - Glasgow
Post
by Joe » Fri Jun 04, 2004 11:39 am
$this->errIndex[9]="Im a bad coder. So sue me";
Not to polite!
d3ad1ysp0rk
Forum Donator
Posts: 1661 Joined: Mon Oct 20, 2003 8:31 pm
Location: Maine, USA
Post
by d3ad1ysp0rk » Fri Jun 04, 2004 10:40 pm
error! 3 errIndex[9] values!
::shutdown mode::
fastfingertips
Forum Contributor
Posts: 242 Joined: Sun Dec 28, 2003 1:40 am
Contact:
Post
by fastfingertips » Sat Jun 05, 2004 1:46 am
Hey people i have a low imagination but yours is to high.
Also markl999 if you have something clever to post please do it otherwise keep you daily words inside of your limited brain, do not spam my thread with useless words (you may also try to read the rules of the forum).
feyd
Neighborhood Spidermoddy
Posts: 31559 Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA
Post
by feyd » Sat Jun 05, 2004 3:12 am
I'm pretty unimaginative when it comes to error codes and the like so:
the many (2897) base error codes from Windows (in ready to use array form)
a bunch are useless, but many could be useful..
[edit] Here's their
most generic errors:
Code: Select all
Array
(
'E_UNEXPECTED' => 'Catastrophic failure',
'E_NOTIMPL' => 'Not implemented',
'E_OUTOFMEMORY' => 'Ran out of memory',
'E_INVALIDARG' => 'One or more arguments are invalid',
'E_NOINTERFACE' => 'No such interface supported',
'E_POINTER' => 'Invalid pointer',
'E_HANDLE' => 'Invalid handle',
'E_ABORT' => 'Operation aborted',
'E_FAIL' => 'Unspecified error',
'E_ACCESSDENIED' => 'General access denied error',
'E_NOTIMPL' => 'Not implemented',
'E_OUTOFMEMORY' => 'Ran out of memory',
'E_INVALIDARG' => 'One or more arguments are invalid',
'E_NOINTERFACE' => 'No such interface supported',
'E_POINTER' => 'Invalid pointer',
'E_HANDLE' => 'Invalid handle',
'E_ABORT' => 'Operation aborted',
'E_FAIL' => 'Unspecified error',
'E_ACCESSDENIED' => 'General access denied error',
'E_PENDING' => 'The data necessary to complete this operation is not yet available.',
);
Last edited by
feyd on Sat Jun 05, 2004 3:26 am, edited 1 time in total.
markl999
DevNet Resident
Posts: 1972 Joined: Thu Oct 16, 2003 5:49 pm
Location: Manchester (UK)
Post
by markl999 » Sat Jun 05, 2004 3:25 am
Also markl999 if you have something clever to post please do it otherwise keep you daily words inside of your limited brain, do not spam my thread with useless words (you may also try to read the rules of the forum).
Was there any need for that? My post was obviously intended to be light hearted and in good humour and didn't require such a response from you. Please point me to the specific forum rule i broke.
(I was going to ignore your reply but my limited brain wouldn't let me)
fastfingertips
Forum Contributor
Posts: 242 Joined: Sun Dec 28, 2003 1:40 am
Contact:
Post
by fastfingertips » Sat Jun 05, 2004 4:16 am
You Suck <- Are you using this every day? I was politely and i'm trying to make a thing, a serious thing. So please appologise but i cannot understand your humour.
d3ad1ysp0rk
Forum Donator
Posts: 1661 Joined: Mon Oct 20, 2003 8:31 pm
Location: Maine, USA
Post
by d3ad1ysp0rk » Sat Jun 05, 2004 9:05 am
Just making sure, you realize he was talking about the user, not you, right?
Joe
Forum Regular
Posts: 939 Joined: Sun Feb 29, 2004 1:26 pm
Location: UK - Glasgow
Post
by Joe » Sat Jun 05, 2004 11:59 am
I think that was pathetic what you said to mark. Hes only having a laugh like the rest of us.
evilmonkey
Forum Regular
Posts: 823 Joined: Sun Oct 06, 2002 1:24 pm
Location: Toronto, Canada
Post
by evilmonkey » Sat Jun 05, 2004 1:12 pm
Yeah, I agree. How about the guy that said php was bieng extremely gay? Why didn't you yell at him? Come on man, lighten up.
Cheers!