cvs: phpdoc-it /reference/errorfunc/functions debug-backtrace.xml debug-print-backtrace.xml restore-exception-handler.xml set-exception-handler.xml

From: Date: Fri, 29 Apr 2005 12:19:03 +0000
Subject: cvs: phpdoc-it /reference/errorfunc/functions debug-backtrace.xml debug-print-backtrace.xml restore-exception-handler.xml set-exception-handler.xml
Groups: php.doc.it 
Request: Send a blank email to doc-it+get-703@lists.php.net to get a copy of this message
darvina Fri Apr 29 08:19:03 2005 EDT Added files: /phpdoc-it/reference/errorfunc/functions debug-backtrace.xml debug-print-backtrace.xml restore-exception-handler.xml set-exception-handler.xml Log: Italian translation by Andrea

http://cvs.php.net/co.php/phpdoc-it/reference/errorfunc/functions/debug-backtrace.xml?r=1.1&p=1 Index: phpdoc-it/reference/errorfunc/functions/debug-backtrace.xml +++ phpdoc-it/reference/errorfunc/functions/debug-backtrace.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- splitted from ./it/functions/errorfunc.xml, last change in rev 1.1 --> <!-- last change to 'debug-backtrace' in en/ tree in rev 1.1 --> <!-- EN-Revision: 1.13 Maintainer: pulici Status: ready --> <!-- OLD-Revision: 1.27/EN.1.1 --> <refentry id="function.debug-backtrace"> <refnamediv> <refname>debug_backtrace</refname> <refpurpose> Genera una backtrace </refpurpose> </refnamediv> <refsect1> &reftitle.description; <methodsynopsis> <type>array</type><methodname>debug_backtrace</methodname> <void/> </methodsynopsis> <para> <function>debug_backtrace</function> genera una backtrace PHP e restituisce questa informazione sotto forma di <type>array</type> associativo. Gli elementi che possono venire restituiti sono elencati nella seguente tabella: </para> <para> <table> <title>Elementi restituibili dalla funzione <function>debug_backtrace</function></title> <tgroup cols="3"> <thead> <row> <entry>Nome</entry> <entry>Tipo</entry> <entry>Descrizione</entry> </row> </thead> <tbody> <row> <entry>funzione</entry> <entry><type>string</type></entry> <entry> Il nome della funzione corrente. Vedere anche <link linkend="language.constants.predefined">__FUNCTION__</link>. </entry> </row> <row> <entry>riga</entry> <entry><type>integer</type></entry> <entry> Il numero della linea corrente. Vedere anche <link linkend="language.constants.predefined">__LINE__</link>. </entry> </row> <row> <entry>file</entry> <entry><type>string</type></entry> <entry> Il nome del file corrente. Vedere anche <link linkend="language.constants.predefined">__FILE__</link>. </entry> </row> <row> <entry>classe</entry> <entry><type>string</type></entry> <entry> Il nome della <link linkend="language.oop">class</link> corrente. Vedere anche <link linkend="language.constants.predefined">__CLASS__</link> </entry> </row> <row> <entry>tipo</entry> <entry><type>string</type></entry> <entry> Il tipo di chiamata corrente. Se chiamata di metodo, viene restituito "->" is returned. Se chiamata di metodo statico, viene restituito "::". Se chiamata di funzione, non viene restituito niente. </entry> </row> <row> <entry>args</entry> <entry><type>array</type></entry> <entry> Se all'interno di una funzione, elenca gli argomenti della funzione. Se all'interno di un file incluso, elenca i nomi del file incluso. </entry> </row> </tbody> </tgroup> </table> </para> <para> Di seguito un semplice esempio. </para> <para> <example> <title> <function>debug_backtrace</function> example </title> <programlisting role="php"> <![CDATA[ <?php // filename: a.php function a_test($str) { echo "\nHi: $str"; var_dump(debug_backtrace()); } a_test('friend'); ?> <?php // filename: b.php include_once '/tmp/a.php'; ?> ]]> </programlisting> <para> Risultati durante l'esecuzione di <filename>/tmp/b.php</filename>: </para> <screen> <![CDATA[ Hi: friend array(2) { [0]=> array(4) { ["file"] => string(10) "/tmp/a.php" ["line"] => int(10) ["function"] => string(6) "a_test" ["args"]=> array(1) { [0] => &string(6) "friend" } } [1]=> array(4) { ["file"] => string(10) "/tmp/b.php" ["line"] => int(2) ["args"] => array(1) { [0] => string(10) "/tmp/a.php" } ["function"] => string(12) "include_once" } } ]]> </screen> </example> </para> <para> Vedere anche <function>trigger_error</function> and <function>debug_print_backtrace</function>. </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 --> http://cvs.php.net/co.php/phpdoc-it/reference/errorfunc/functions/debug-print-backtrace.xml?r=1.1&p=1 Index: phpdoc-it/reference/errorfunc/functions/debug-print-backtrace.xml +++ phpdoc-it/reference/errorfunc/functions/debug-print-backtrace.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- splitted from ./it/functions/errorfunc.xml, last change in rev 1.1 --> <!-- last change to 'debug-print-backtrace' in en/ tree in rev 1.1 --> <!-- EN-Revision: 1.3 Maintainer: pulici Status: ready --> <!-- OLD-Revision: 1.27/EN.1.1 --> <refentry id="function.debug-print-backtrace"> <refnamediv> <refname>debug_print_backtrace</refname> <refpurpose> Stampa una backtrace </refpurpose> </refnamediv> <refsect1> &reftitle.description; <methodsynopsis> <type>void</type><methodname>debug_print_backtrace</methodname> <void/> </methodsynopsis> <para> <function>debug_print_backtrace</function> stampa una backtrace PHP. Stampa le chiamate di funzione, i file included/required e tutto cio' che viene valutato dalla funzione <function>eval</function>. </para> </refsect1> <refsect1 role="parameters"> &reftitle.parameters; <para> Questa funzione non ha parametri. </para> </refsect1> <refsect1 role="returnvalues"> &reftitle.returnvalues; <para> &return.void; </para> </refsect1> <refsect1 role="examples"> &reftitle.examples; <para> <example> <title>Esempio di funzione <function>debug_print_backtrace</function></title> <programlisting role="php"> <![CDATA[ <?php // include.php file function a() { b(); } function b() { c(); } function c(){ debug_print_backtrace(); } a(); ?> <?php // test.php file // questo e' il file che dovrebbe essere eseguito include 'include.php'; ?> ]]> </programlisting> &example.outputs.similar; <screen> <![CDATA[ #0 eval() called at [/tmp/include.php:5] #1 a() called at [/tmp/include.php:17] #2 include(/tmp/include.php) called at [/tmp/test.php:3] #0 c() called at [/tmp/include.php:10] #1 b() called at [/tmp/include.php:6] #2 a() called at [/tmp/include.php:17] #3 include(/tmp/include.php) called at [/tmp/test.php:3] ]]> </screen> </example> </para> </refsect1> <refsect1 role="seealso"> &reftitle.seealso; <para> <simplelist> <member><function>debug_backtrace</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 --> http://cvs.php.net/co.php/phpdoc-it/reference/errorfunc/functions/restore-exception-handler.xml?r=1.1&p=1 Index: phpdoc-it/reference/errorfunc/functions/restore-exception-handler.xml +++ phpdoc-it/reference/errorfunc/functions/restore-exception-handler.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- splitted from ./it/functions/errorfunc.xml, last change in rev 1.1 --> <!-- last change to 'restore-exception-handler' in en/ tree in rev 1.1 --> <!-- EN-Revision: 1.3 Maintainer: pulici Status: ready --> <!-- OLD-Revision: 1.27/EN.1.1 --> <refentry id="function.restore-exception-handler"> <refnamediv> <refname>restore_exception_handler</refname> <refpurpose> Ripristina la funzione di gestione delle eccezioni definita in precedenza </refpurpose> </refnamediv> <refsect1> &reftitle.description; <methodsynopsis> <type>bool</type><methodname>restore_exception_handler</methodname> <void/> </methodsynopsis> <para> Utilizzata, dopo aver cambiato la funzione di gestione delle eccezioni con il comando <function>set_exception_handler</function>, per tornare al gestore delle eccezioni precedente (che potrebbe essere la funzione incorporata o una funzione definita dall'utente). Questa funzione restituisce sempre &true;. </para> <para> Vedere anche <function>set_exception_handler</function>, <function>set_error_handler</function>, <function>restore_error_handler</function> <function>error_reporting</function> </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 --> http://cvs.php.net/co.php/phpdoc-it/reference/errorfunc/functions/set-exception-handler.xml?r=1.1&p=1 Index: phpdoc-it/reference/errorfunc/functions/set-exception-handler.xml +++ phpdoc-it/reference/errorfunc/functions/set-exception-handler.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- splitted from ./it/functions/errorfunc.xml, last change in rev 1.1 --> <!-- last change to 'set-exception-handler' in en/ tree in rev 1.1 --> <!-- EN-Revision: 1.6 Maintainer: pulici Status: ready --> <!-- OLD-Revision: 1.27/EN.1.1 --> <refentry id="function.set-exception-handler"> <refnamediv> <refname>set_exception_handler</refname> <refpurpose> Imposta una funzione di gestione delle eccezioni definita dall'utente </refpurpose> </refnamediv> <refsect1> &reftitle.description; <methodsynopsis> <type>string</type><methodname>set_exception_handler</methodname> <methodparam><type>callback</type><parameter>exception_handler</parameter></methodparam> </methodsynopsis> <para> Imposta la funzione predefinita per la gestione delle eccezioni se un'eccezione non viene individuata all'interno di un blocco try/catch. L'esecuzione sara' terminata dopo la chiamata della funzione <parameter>exception_handler</parameter>. </para> <para> La funzione <parameter>exception_handler</parameter> deve essere definita prima di invocare la funzione <function>set_exception_handler</function>. A quest'ultima funzione deve essere passato un solo parametro, che consiste nell'eccezione individuata. <methodsynopsis> <methodname><replaceable>exception_handler</replaceable></methodname> <methodparam><type>object</type><parameter>exception</parameter></methodparam> </methodsynopsis> <variablelist> <varlistentry> <term><parameter>exception</parameter></term> <listitem> <para> Nome della funzione da invocare in caso di eccezione non individuata. </para> </listitem> </varlistentry> </variablelist> </para> </refsect1> <refsect1> &reftitle.parameters; <para> <variablelist> <varlistentry> <term><parameter>exception_handler</parameter></term> <listitem> <para> Nome della funzione da invocare in caso di eccezione non individuata. </para> </listitem> </varlistentry> </variablelist> </para> </refsect1> <refsect1> &reftitle.returnvalues; <para> Restituisce la funzione di gestione delle eccezioni definita in precedenza, oppure &false; in caso di errore. Se non era stata definita in precedenza nessuna funzione di gestione delle eccezioni, viene restituita una stringa vuota. </para> </refsect1> <refsect1> &reftitle.examples; <para> <example> <title>Esempio di funzione <function>set_exception_handler</function></title> <programlisting role="php"> <![CDATA[ <?php function exception_handler($exception) { echo "Eccezione non individuata: " , $exception->getMessage(), "\n"; } set_exception_handler('exception_handler'); throw new Exception('Uncaught Exception'); echo "Non eseguita\n"; ?> ]]> </programlisting> </example> </para> </refsect1> <refsect1> &reftitle.seealso; <para> <function>restore_exception_handler</function>, <function>restore_error_handler</function>, <function>error_reporting</function>, &seealso.callback;, &listendand; <link linkend="language.exceptions">PHP 5 Exceptions</link>. </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 -->
« previous php.doc.it (#703) next »