mirror of
https://github.com/php/doc-es.git
synced 2026-03-26 00:12:06 +01:00
git-svn-id: https://svn.php.net/repository/phpdoc/es/trunk@332741 c90b9560-bf6c-de11-be94-00142212c4b1
98 lines
2.4 KiB
XML
98 lines
2.4 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<!-- EN-Revision: 13bf1bc8f52ce8b4e26a2887313bcb3f1e00d36d Maintainer: jpberdejo Status: ready -->
|
|
<refentry xml:id="function.restore-error-handler" xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>restore_error_handler</refname>
|
|
<refpurpose>Recupera la función de gestión de errores previa</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>bool</type><methodname>restore_error_handler</methodname>
|
|
<void/>
|
|
</methodsynopsis>
|
|
<para>
|
|
Usada después de modificar la función de gestión de errores usando
|
|
<function>set_error_handler</function>, para revertir al gestor de
|
|
errores previo (el cual puede ser el incorporado o una función definida
|
|
por el usuario).
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
Esta función siempre devuelve &true;.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title>Ejemplo de <function>restore_error_handler</function></title>
|
|
<para>
|
|
Decidir si <function>unserialize</function> causó un error, entonces
|
|
recuperar el gestor de errores original.
|
|
</para>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
function gestor_unserialize($errno, $errstr)
|
|
{
|
|
echo "Valor seriado inválido.\n";
|
|
}
|
|
|
|
$seriado = 'foo';
|
|
set_error_handler('gestor_unserialize');
|
|
$original = unserialize($seriado);
|
|
restore_error_handler();
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
&example.outputs;
|
|
<screen>
|
|
<![CDATA[
|
|
Valor seriado inválido.
|
|
]]>
|
|
</screen>
|
|
</example>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<para>
|
|
<simplelist>
|
|
<member><function>error_reporting</function></member>
|
|
<member><function>set_error_handler</function></member>
|
|
<member><function>restore_exception_handler</function></member>
|
|
<member><function>trigger_error</function></member>
|
|
</simplelist>
|
|
</para>
|
|
</refsect1>
|
|
</refentry>
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
Local variables:
|
|
mode: sgml
|
|
sgml-omittag:t
|
|
sgml-shorttag:t
|
|
sgml-minimize-attributes:nil
|
|
sgml-always-quote-attributes:t
|
|
sgml-indent-step:1
|
|
sgml-indent-data:t
|
|
indent-tabs-mode:nil
|
|
sgml-parent-document:nil
|
|
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
|
sgml-exposed-tags:nil
|
|
sgml-local-catalogs:nil
|
|
sgml-local-ecat-files:nil
|
|
End:
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
vim: et tw=78 syn=sgml
|
|
vi: ts=1 sw=1
|
|
-->
|