1
0
mirror of https://github.com/php/doc-de.git synced 2026-03-25 07:42:18 +01:00
Files
archived-doc-de/reference/errorfunc/functions/error-reporting.xml
Nilgün Belma Bugüner 4bb4fa807d changed EN-Revision tag as cvs2svn;
fixed svn properties

git-svn-id: https://svn.php.net/repository/phpdoc/de/trunk@283887 c90b9560-bf6c-de11-be94-00142212c4b1
2009-07-11 22:26:39 +00:00

288 lines
8.5 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: n/a Maintainer: hholzgra Status: ready -->
<refentry xml:id="function.error-reporting" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>error_reporting</refname>
<refpurpose>
Gibt an, welche PHP-Fehlermeldungen angezeigt werden
</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>int</type><methodname>error_reporting</methodname>
<methodparam choice="opt"><type>int</type><parameter>level</parameter></methodparam>
</methodsynopsis>
<para>
Mit <function>error_reporting</function> wird die <link linkend="ini.error-reporting">error_reporting</link>
Direktive zur Laufzeit des Programms gesetzt. In PHP gibt es viele
Stufen für die Anzeige von Fehlermeldungen, die mit dieser
Funktion für die Dauer der Programmausführung eingestellt werden
kann.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>level</parameter></term>
<listitem>
<para>
Das neue <link linkend="ini.error-reporting">error_reporting</link>
Level. Es können sowohl eine numerische Bitmaske als auch benannte Konstanten
übergeben werden. Der Einsatz benannter Konstanten wird empfohlen
um die Kompatibilität mit zukünftigen Versionen sicherzustellen.
Wann immer Error Level Konstanten hinzugefügt werden erweitert
sich der genutzte Integerbereich so das ältere Integerkonstanten
nicht unbedingt weiter das erwartete Verhalten zeigen.
</para>
<para>
Die folgende Tabelle listet die verfügbaren Konstanten auf.
Die Bedeutung der jeweiligen Error Level finden Sie im
Abschnitt
<link linkend="errorfunc.constants">predefined constants</link>.
<table>
<title><function>error_reporting</function> Level Konstanten und Bit-Werte</title>
<tgroup cols="2">
<thead>
<row>
<entry>value</entry>
<entry>constant</entry>
</row>
</thead>
<tbody>
<row>
<entry>1</entry>
<entry>
<link linkend="errorfunc.constants.errorlevels.e-error">E_ERROR</link>
</entry>
</row>
<row>
<entry>2</entry>
<entry>
<link linkend="errorfunc.constants.errorlevels.e-warning">E_WARNING</link>
</entry>
</row>
<row>
<entry>4</entry>
<entry>
<link linkend="errorfunc.constants.errorlevels.e-parse">E_PARSE</link>
</entry>
</row>
<row>
<entry>8</entry>
<entry>
<link linkend="errorfunc.constants.errorlevels.e-notice">E_NOTICE</link>
</entry>
</row>
<row>
<entry>16</entry>
<entry>
<link linkend="errorfunc.constants.errorlevels.e-core-error">E_CORE_ERROR</link>
</entry>
</row>
<row>
<entry>32</entry>
<entry>
<link linkend="errorfunc.constants.errorlevels.e-core-warning">E_CORE_WARNING</link>
</entry>
</row>
<row>
<entry>64</entry>
<entry>
<link linkend="errorfunc.constants.errorlevels.e-compile-error">E_COMPILE_ERROR</link>
</entry>
</row>
<row>
<entry>128</entry>
<entry>
<link linkend="errorfunc.constants.errorlevels.e-compile-warning">E_COMPILE_WARNING</link>
</entry>
</row>
<row>
<entry>256</entry>
<entry>
<link linkend="errorfunc.constants.errorlevels.e-user-error">E_USER_ERROR</link>
</entry>
</row>
<row>
<entry>512</entry>
<entry>
<link linkend="errorfunc.constants.errorlevels.e-user-warning">E_USER_WARNING</link>
</entry>
</row>
<row>
<entry>1024</entry>
<entry>
<link linkend="errorfunc.constants.errorlevels.e-user-error">E_USER_NOTICE</link>
</entry>
</row>
<row>
<entry>6143</entry>
<entry>
<link linkend="errorfunc.constants.errorlevels.e-all">E_ALL</link>
</entry>
</row>
<row>
<entry>2048</entry>
<entry>
<link linkend="errorfunc.constants.errorlevels.e-strict">E_STRICT</link>
</entry>
</row>
<row>
<entry>4096</entry>
<entry>
<link linkend="errorfunc.constants.errorlevels.e-recoverable-error">E_RECOVERABLE_ERROR</link>
</entry>
</row>
<row>
<entry>8192</entry>
<entry>
<link linkend="errorfunc.constants.errorlevels.e-deprecated-error">E_DEPRECATED</link>
</entry>
</row>
<row>
<entry>16384</entry>
<entry>
<link linkend="errorfunc.constants.errorlevels.e-user-deprecated">E_USER_DEPRECATED</link>
</entry>
</row>
</tbody>
</tgroup>
</table>
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Gibt den bisherigen <link linkend="ini.error-reporting">error_reporting</link> Wert zurück
level.
</para>
</refsect1>
<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>5.0.0</entry>
<entry><constant>E_STRICT</constant> wurde hinzugefügt (ist aber nicht Teil von <constant>E_ALL</constant>).</entry>
</row>
<row>
<entry>5.2.0</entry>
<entry><constant>E_RECOVERABLE_ERROR</constant> wurde hinzugefügt.</entry>
</row>
<row>
<entry>5.3.0</entry>
<entry><constant>E_DEPRECATED</constant> und <constant>E_USER_DEPRECATED</constant>
wurden hinzugefügt.</entry>
</row>
<row>
<entry>6</entry>
<entry><constant>E_STRICT</constant> ist nun in <constant>E_ALL</constant> enthalten.</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title><function>error_reporting</function> Beispiel</title>
<programlisting role="php">
<![CDATA[
<?php
// Error Reporting komplett abschalten
error_reporting(0);
// Nur einfache Fehler melden
error_reporting(E_ERROR | E_WARNING | E_PARSE);
// E_NOTICE ist sinnvoll um uninitialisierte oder
// falsch geschriebene Variablen zu entdecken
error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE);
// Melde alle Fehler außer E_NOTICE
// Dies ist der Vorgabewert in php.ini
error_reporting(E_ALL ^ E_NOTICE);
// Melde alle PHP Fehler
error_reporting(E_ALL);
// Dies entspricht error_reporting(E_ALL);
ini_set('error_reporting', E_ALL);
?>
]]>
</programlisting>
</example>
</para>
</refsect1>
<refsect1 role="notes">
&reftitle.notes;
<warning>
<simpara>
Most of <constant>E_STRICT</constant> errors are evaluated at the
compile time thus such errors are not reported in the file where
<link linkend="ini.error-reporting">error_reporting</link> is enhanced
to include <constant>E_STRICT</constant> errors (and vice versa).
</simpara>
</warning>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member>Die <link linkend="ini.display-errors">display_errors</link> Direktive</member>
<member>The <link linkend="ini.html-errors">html_errors</link> directive</member>
<member>The <link linkend="ini.xmlrpc-errors">xmlrpc_errors</link> directive</member>
<member><function>ini_set</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:"../../../../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
-->