1
0
mirror of https://github.com/php/doc-de.git synced 2026-03-24 07:12:15 +01:00
Files
archived-doc-de/reference/pgsql/functions/pg-set-error-verbosity.xml
2021-10-16 21:29:00 +03:00

143 lines
4.3 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: c2eca73ef79ebe78cebb34053e41b565af504c4f Maintainer: conni Status: ready -->
<refentry xml:id="function.pg-set-error-verbosity" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>pg_set_error_verbosity</refname>
<refpurpose>
Bestimmt den Detaillierungsgrad von Fehlermeldungen, die von
<function>pg_last_error</function> und <function>pg_result_error</function> zurückgegeben werden
</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>int</type><methodname>pg_set_error_verbosity</methodname>
<methodparam choice="opt"><type>PgSql\Connection</type><parameter>connection</parameter></methodparam>
<methodparam><type>int</type><parameter>verbosity</parameter></methodparam>
</methodsynopsis>
<para>
Bestimmt den Detaillierungsgrad von Fehlermeldungen, die von
<function>pg_last_error</function> und <function>pg_result_error</function> zurückgegeben werden.
</para>
<para>
<function>pg_set_error_verbosity</function> setzt einen neuen Modus für
Fehlermeldungen und gibt die zuvor gesetzte Einstellung zurück. Im Modus
<constant>PGSQL_ERRORS_TERSE</constant> enthalten die Meldungen nur
Angaben über den Detaillierungsgrad, einen Kurztext, sowie die Position
des Fehlers. Dies passt normalerweise in eine Zeile. Im Standard-Modus,
<constant>PGSQL_ERRORS_DEFAULT</constant>, wird das obige samt aller
Einzelheiten, Hinweise oder Kontextfelder des Fehlers ausgegeben (was
mehrere Zeilen in Anspruch nehmen kann). Der Modus
<constant>PGSQL_ERRORS_VERBOSE</constant> schließt alle verfügbaren
Felder ein. Eine Änderung des Detaillierungsgrads hat keine Auswirkung
auf Meldungen bereits existierender Ergebnisse, sondern nur auf die,
die danach erzeugt wurden.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>connection</parameter></term>
<listitem>
&pgsql.parameter.connection-with-unspecified-default;
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>verbosity</parameter></term>
<listitem>
<para>
Der gewünschte Detaillierungsgrad: <constant>PGSQL_ERRORS_TERSE</constant>,
<constant>PGSQL_ERRORS_DEFAULT</constant> oder <constant>PGSQL_ERRORS_VERBOSE</constant>.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Der vorher eingestellte Detaillierungsgrad: <constant>PGSQL_ERRORS_TERSE</constant>,
<constant>PGSQL_ERRORS_DEFAULT</constant> oder <constant>PGSQL_ERRORS_VERBOSE</constant>.
</para>
</refsect1>
<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
&pgsql.changelog.connection-object;
</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title><function>pg_set_error_verbosity</function> Beispiel</title>
<programlisting role="php">
<![CDATA[
<?php
$dbconn = pg_connect("dbname=publisher") or die("Konnte nicht verbinden");
if (!pg_connection_busy($dbconn)) {
pg_send_query($dbconn, "select * from doesnotexist;");
}
pg_set_error_verbosity($dbconn, PGSQL_ERRORS_VERBOSE);
$res1 = pg_get_result($dbconn);
echo pg_result_error($res1);
?>
]]>
</programlisting>
</example>
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>pg_last_error</function></member>
<member><function>pg_result_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
-->