<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.mongodb-driver-exception-runtimeexception.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'zh',
  ),
  'this' => 
  array (
    0 => 'mongodb-driver-runtimeexception.haserrorlabel.php',
    1 => 'MongoDB\\Driver\\Exception\\RuntimeException::hasErrorLabel',
    2 => 'Returns whether an error label is associated with an exception',
  ),
  'up' => 
  array (
    0 => 'class.mongodb-driver-exception-runtimeexception.php',
    1 => 'MongoDB\\Driver\\Exception\\RuntimeException',
  ),
  'prev' => 
  array (
    0 => 'class.mongodb-driver-exception-runtimeexception.php',
    1 => 'MongoDB\\Driver\\Exception\\RuntimeException',
  ),
  'next' => 
  array (
    0 => 'class.mongodb-driver-exception-serverexception.php',
    1 => 'MongoDB\\Driver\\Exception\\ServerException',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/mongodb/mongodb/driver/exception/runtimeexception/haserrorlabel.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="mongodb-driver-runtimeexception.haserrorlabel" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">MongoDB\Driver\Exception\RuntimeException::hasErrorLabel</h1>
  <p class="verinfo">(mongodb &gt;= 1.6.0)</p><p class="refpurpose"><span class="refname">MongoDB\Driver\Exception\RuntimeException::hasErrorLabel</span> &mdash; <span class="dc-title">Returns whether an error label is associated with an exception</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-mongodb-driver-runtimeexception.haserrorlabel-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">final</span> <span class="modifier">public</span> <span class="methodname"><strong>MongoDB\Driver\Exception\RuntimeException::hasErrorLabel</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$errorLabel</code></span>): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>

  <p class="simpara">
   Returns whether the <code class="parameter">errorLabel</code> has been set for this
   exception. Error labels are set by either the server or the extension to
   indicate specific situations that may be handled by an application. A common
   situation might be determining whether to safely retry a transaction that
   failed due to a transient error (e.g. network error, transaction conflict).
   Examples of error labels are <code class="literal">TransientTransactionError</code>
   and <code class="literal">UnknownTransactionCommitResult</code>.
  </p>

 </div>


 <div class="refsect1 parameters" id="refsect1-mongodb-driver-runtimeexception.haserrorlabel-parameters">
  <h3 class="title">参数</h3>
  <dl>
   
    <dt><code class="parameter">errorLabel</code></dt>
    <dd>
     <span class="simpara">The name of the <code class="literal">errorLabel</code> to test for.</span>
    </dd>
   
  </dl>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-mongodb-driver-runtimeexception.haserrorlabel-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="simpara">
   Whether the given <code class="literal">errorLabel</code> is associated with this
   exception.
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-mongodb-driver-runtimeexception.haserrorlabel-seealso">
  <h3 class="title">参见</h3>
  <ul class="simplelist">
   <li><span class="function"><a href="mongodb-driver-session.committransaction.php" class="function" rel="rdfs-seeAlso">MongoDB\Driver\Session::commitTransaction()</a> - Commits a transaction</span></li>
   <li><a href="https://www.mongodb.com/docs/manual/core/transactions/" class="link external">&raquo;&nbsp;MongoDB documentation on transactions</a></li>
  </ul>
 </div>


</div><?php manual_footer($setup); ?>