1
0
mirror of https://github.com/php/doc-en.git synced 2026-03-23 23:32:18 +01:00
Files
2022-12-11 23:25:52 +01:00

65 lines
1.9 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<refentry xml:id="fiber.throw" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>Fiber::throw</refname>
<refpurpose>Resumes execution of the fiber with an exception</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis role="Fiber">
<modifier>public</modifier> <type>mixed</type><methodname>Fiber::throw</methodname>
<methodparam><type>Throwable</type><parameter>exception</parameter></methodparam>
</methodsynopsis>
<para>
Resumes the fiber by throwing the given exception from the current <methodname>Fiber::suspend</methodname> call.
</para>
<para>
If the fiber is not suspended when this method is called, a <classname>FiberError</classname> will be thrown.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<variablelist>
<varlistentry>
<term><parameter>exception</parameter></term>
<listitem>
<para>
The exception to throw into the fiber from the current <methodname>Fiber::suspend</methodname> call.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
The value provided to the next call to <methodname>Fiber::suspend</methodname> or &null; if the fiber returns.
If the fiber throws an exception before suspending, it will be thrown from the call to this method.
</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
-->