<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.yaf-request-abstract.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'uk',
  ),
  'this' => 
  array (
    0 => 'yaf-request-abstract.getexception.php',
    1 => 'Yaf_Request_Abstract::getException',
    2 => 'Retrieve the exception',
  ),
  'up' => 
  array (
    0 => 'class.yaf-request-abstract.php',
    1 => 'Yaf_Request_Abstract',
  ),
  'prev' => 
  array (
    0 => 'yaf-request-abstract.getenv.php',
    1 => 'Yaf_Request_Abstract::getEnv',
  ),
  'next' => 
  array (
    0 => 'yaf-request-abstract.getfiles.php',
    1 => 'Yaf_Request_Abstract::getFiles',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/yaf/yaf_request_abstract/getexception.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="yaf-request-abstract.getexception" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">Yaf_Request_Abstract::getException</h1>
  <p class="verinfo">(Yaf &gt;=1.0.0)</p><p class="refpurpose"><span class="refname">Yaf_Request_Abstract::getException</span> &mdash; <span class="dc-title">Retrieve the exception</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-yaf-request-abstract.getexception-description">
  <h3 class="title">Опис</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="modifier">function</span> <span class="methodname"><strong>Yaf_Request_Abstract::getException</strong></span>(): <span class="type"><span class="type"><a href="language.types.null.php" class="type null">?</a></span><span class="type"><a href="class.exception.php" class="type Exception">Exception</a></span></span></div>

  <p class="simpara">Retrieve the exception caught during dispatching.</p>
 </div>


 <div class="refsect1 parameters" id="refsect1-yaf-request-abstract.getexception-parameters">
  <h3 class="title">Параметри</h3>
  <p class="para">У цієї функції немає
параметрів.</p>
 </div>

 <div class="refsect1 returnvalues" id="refsect1-yaf-request-abstract.getexception-returnvalues">
  <h3 class="title">Значення, що повертаються</h3>
  <p class="simpara">The <span class="exceptionname"><a href="class.exception.php" class="exceptionname">Exception</a></span> caught during dispatching, or <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong> if none.</p>
 </div>


 <div class="refsect1 examples" id="refsect1-yaf-request-abstract.getexception-examples">
  <h3 class="title">Приклади</h3>
  <div class="example" id="example-1">
   <p><strong>Приклад #1 <span class="methodname"><strong>Yaf_Request_Abstract::getException()</strong></span> example</strong></p>
   <div class="example-contents">
<div class="phpcode"><pre><code style="color: #000000"><span style="color: #0000BB">&lt;?php
</span><span style="color: #FF8000">// In the bootstrap, enable exception catching so that any exception
// thrown during dispatching is forwarded to the error action
</span><span style="color: #0000BB">Yaf_Dispatcher</span><span style="color: #007700">::</span><span style="color: #0000BB">getInstance</span><span style="color: #007700">()-&gt;</span><span style="color: #0000BB">catchException</span><span style="color: #007700">(</span><span style="color: #0000BB">true</span><span style="color: #007700">);

class </span><span style="color: #0000BB">ErrorController </span><span style="color: #007700">extends </span><span style="color: #0000BB">Yaf_Controller_Abstract
</span><span style="color: #007700">{
    public function </span><span style="color: #0000BB">errorAction</span><span style="color: #007700">(</span><span style="color: #0000BB">$exception</span><span style="color: #007700">)
    {
        </span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">$this</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getRequest</span><span style="color: #007700">()-&gt;</span><span style="color: #0000BB">getException</span><span style="color: #007700">() === </span><span style="color: #0000BB">$exception</span><span style="color: #007700">);
    }
}
</span><span style="color: #0000BB">?&gt;</span></code></pre></div>
   </div>

   <div class="example-contents"><p>Поданий вище приклад виведе щось
схоже на:</p></div>
   <div class="example-contents screen">
<div class="examplescode"><pre class="examplescode">bool(true)</pre>
</div>
   </div>
  </div>
 </div>


 <div class="refsect1 seealso" id="refsect1-yaf-request-abstract.getexception-seealso">
  <h3 class="title">Прогляньте також</h3>
  <ul class="simplelist">
   <li><span class="methodname"><a href="yaf-dispatcher.catchexception.php" class="methodname" rel="rdfs-seeAlso">Yaf_Dispatcher::catchException()</a> - Switch on/off exception catching</span></li>
  </ul>
 </div>

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