<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->

<refentry xml:id="mongodb-driver-runtimeexception.haserrorlabel" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
 <refnamediv>
  <refname>MongoDB\Driver\Exception\RuntimeException::hasErrorLabel</refname>
  <refpurpose>Returns whether an error label is associated with an exception</refpurpose>
 </refnamediv>

 <refsect1 role="description">
  &reftitle.description;
  <methodsynopsis>
   <modifier>final</modifier> <modifier>public</modifier> <type>bool</type><methodname>MongoDB\Driver\Exception\RuntimeException::hasErrorLabel</methodname>
   <methodparam><type>string</type><parameter>errorLabel</parameter></methodparam>
  </methodsynopsis>
  <para>
   Returns whether the <parameter>errorLabel</parameter> has been set for this
   exception. Error labels are set by either the server or the driver to
   indicated specific situations on which you might want to decide on how you
   want to handle a specific exception. A common situation might be to find
   out whether you can safely retry a transaction that failed due to a
   transient error (like a networking issue, or a transaction conflict).
   Examples of error labels are <literal>TransientTransactionError</literal>
   and <literal>UnknownTransactionCommitResult</literal>.
  </para>

 </refsect1>

 <refsect1 role="parameters">
  &reftitle.parameters;
  <variablelist>
   <varlistentry>
    <term><parameter>errorLabel</parameter></term>
    <listitem>
     <para>The name of the <literal>errorLabel</literal> to test for.</para>
    </listitem>
   </varlistentry>
  </variablelist>
 </refsect1>

 <refsect1 role="returnvalues">
  &reftitle.returnvalues;
  <para>
   Whether the given <literal>errorLabel</literal> is associated with this
   exception.
  </para>
 </refsect1>

 <refsect1 role="seealso">
  &reftitle.seealso;
  <simplelist>
   <member><function>MongoDB\Driver\Session::commitTransaction</function></member>
   <member><link xlink:href="&url.mongodb.docs.transactions;">MongoDB documentation on transactions</link></member>
  </simplelist>
 </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
-->
