Generic Errors - need help

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:

Generic Errors - need help

Post by fastfingertips »

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?
User avatar
Joe
Forum Regular
Posts: 939
Joined: Sun Feb 29, 2004 1:26 pm
Location: UK - Glasgow

Post by Joe »

$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
User avatar
Saethyr
Forum Contributor
Posts: 182
Joined: Thu Sep 25, 2003 9:21 am
Location: Wichita, Kansas USA
Contact:

Post by Saethyr »

$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
User avatar
Joe
Forum Regular
Posts: 939
Joined: Sun Feb 29, 2004 1:26 pm
Location: UK - Glasgow

Post by Joe »

I like the last array element you have there Saethyr, lol Now why didn't i think of that!
User avatar
markl999
DevNet Resident
Posts: 1972
Joined: Thu Oct 16, 2003 5:49 pm
Location: Manchester (UK)

Post by markl999 »

Code: Select all

$this->errIndex[9]="You Suck"; //generic error
User avatar
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 »

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.....";
User avatar
Joe
Forum Regular
Posts: 939
Joined: Sun Feb 29, 2004 1:26 pm
Location: UK - Glasgow

Post by Joe »

$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 »

error! 3 errIndex[9] values!

::shutdown mode::
fastfingertips
Forum Contributor
Posts: 242
Joined: Sun Dec 28, 2003 1:40 am
Contact:

Post by fastfingertips »

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).
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

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.
User avatar
markl999
DevNet Resident
Posts: 1972
Joined: Thu Oct 16, 2003 5:49 pm
Location: Manchester (UK)

Post by markl999 »

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 »

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 »

Just making sure, you realize he was talking about the user, not you, right?
User avatar
Joe
Forum Regular
Posts: 939
Joined: Sun Feb 29, 2004 1:26 pm
Location: UK - Glasgow

Post by Joe »

I think that was pathetic what you said to mark. Hes only having a laugh like the rest of us.
User avatar
evilmonkey
Forum Regular
Posts: 823
Joined: Sun Oct 06, 2002 1:24 pm
Location: Toronto, Canada

Post by evilmonkey »

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!
Post Reply