Sophie

Sophie

distrib > Mandriva > 9.1 > ppc > by-pkgid > a34ed6838d4b29d38abd504392a4a797 > files > 2750

php-manual-es-4.3.0-2mdk.noarch.rpm

<HTML
><HEAD
><TITLE
>trigger_error</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
REL="HOME"
TITLE="Manual de PHP"
HREF="index.html"><LINK
REL="UP"
TITLE="Error Handling and Logging Functions"
HREF="ref.errorfunc.html"><LINK
REL="PREVIOUS"
TITLE="set_error_handler"
HREF="function.set-error-handler.html"><LINK
REL="NEXT"
TITLE="user_error"
HREF="function.user-error.html"><META
HTTP-EQUIV="Content-type"
CONTENT="text/html; charset=ISO-8859-1"></HEAD
><BODY
CLASS="refentry"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>Manual de PHP</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="function.set-error-handler.html"
ACCESSKEY="P"
>Anterior</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="function.user-error.html"
ACCESSKEY="N"
>Siguiente</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><H1
><A
NAME="function.trigger-error"
></A
>trigger_error</H1
><DIV
CLASS="refnamediv"
><A
NAME="AEN17063"
></A
><P
>    (PHP 4 &#62;= 4.0.1)</P
>trigger_error&nbsp;--&nbsp;
     Generates a user-level error/warning/notice message
    </DIV
><DIV
CLASS="refsect1"
><A
NAME="AEN17066"
></A
><H2
>Description</H2
>void <B
CLASS="methodname"
>trigger_error</B
> ( string error_msg [, int error_type])<BR
></BR
><P
>&#13;     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
     (<A
HREF="function.set-error-handler.html"
><B
CLASS="function"
>set_error_handler()</B
></A
>). This function is useful when
     you need to generate a particular response to an exception at runtime.
     For example:
     <DIV
CLASS="informalexample"
><A
NAME="AEN17079"
></A
><P
></P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
CELLPADDING="5"
><TR
><TD
><PRE
CLASS="programlisting"
>if (assert ($divisor == 0))
   trigger_error ("Cannot divide by zero", E_USER_ERROR);</PRE
></TD
></TR
></TABLE
><P
></P
></DIV
>
     <DIV
CLASS="note"
><BLOCKQUOTE
CLASS="note"
><P
><B
>Nota: </B
>
     See <A
HREF="function.set-error-handler.html"
><B
CLASS="function"
>set_error_handler()</B
></A
> for a more extensive example.
     </P
></BLOCKQUOTE
></DIV
>
    </P
><P
>&#13;     See also <A
HREF="function.error-reporting.html"
><B
CLASS="function"
>error_reporting()</B
></A
>,
     <A
HREF="function.set-error-handler.html"
><B
CLASS="function"
>set_error_handler()</B
></A
>,
     <A
HREF="function.restore-error-handler.html"
><B
CLASS="function"
>restore_error_handler()</B
></A
>, 
     <A
HREF="function.user-error.html"
><B
CLASS="function"
>user_error()</B
></A
>
    </P
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="function.set-error-handler.html"
ACCESSKEY="P"
>Anterior</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Inicio</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="function.user-error.html"
ACCESSKEY="N"
>Siguiente</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>set_error_handler</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="ref.errorfunc.html"
ACCESSKEY="U"
>Subir</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>user_error</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>