Copyright © 2005-2008 Andrea Tincani

AndreaPHP | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (Php ?) New Topic New Poll Post Reply
AndreaPHP Forum : PHP General : trigger_error function
Poster Message
neutrall
Level: Scholar


Registered: 28-03-2004
Posts: 43

icon trigger_error function

I've got those nice free chapter from the good people of SitePoint.com. But in some of there example, they use the "trigger_error" function, like the following code in a MySQL class :


        if (!$queryResource = mysql_query($sql, $this->dbConn)) {
            trigger_error('Query failed: ' . mysql_error($this->dbConn) . ' SQL: ' . $sql);
        }



Can someone tell me how I can see or work with those error message?

(I a little lost with class and the object oriented.. but getting use to the procedural php!)

[Edited by neutrall on 17-04-2005 at 11:29 PM GMT]

____________________________
A Stick give a wise man something to think about... and a fool, something to put in is mouth.

18-04-2005 at 04:28 AM
View Profile Send Email to User Show All Posts Visit Homepage ICQ | Quote Reply
admin
Level: Administrator


Registered: 04-04-2002
Posts: 35

icon Re: trigger_error function

This is the function explanation:

bool trigger_error ( string error_msg [, int error_type] )


Used to trigger a user error condition, it can be used by in conjunction with the built-in error handler, or with a user defined function that has been set as the new error handler (set_error_handler()). It only works with the E_USER family of constants, and will default to E_USER_NOTICE.

This function returns FALSE if wrong error_type is specified, TRUE otherwise.

This function is useful when you need to generate a particular response to an exception at runtime


http://it.php.net/manual/en/function.trigger-error.php

____________________________
AndreaVB

18-04-2005 at 06:15 AM
View Profile Send Email to User Show All Posts Visit Homepage | Quote Reply
AndreaPHP Forum : PHP General : trigger_error function
Previous Topic (Php ?) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: AndreaVB

Copyright © 2005-2008 Andrea Tincani

Powered by: tForum tForum Edition b0.92p1
Originally created by Toan Huynh (Copyright © 2000)
Enhanced by the tForumHacks team.