<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.sqlite3.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'tr',
  ),
  'this' => 
  array (
    0 => 'sqlite3.enableexceptions.php',
    1 => 'SQLite3::enableExceptions',
    2 => 'Enable throwing exceptions',
  ),
  'up' => 
  array (
    0 => 'class.sqlite3.php',
    1 => 'SQLite3',
  ),
  'prev' => 
  array (
    0 => 'sqlite3.createfunction.php',
    1 => 'SQLite3::createFunction',
  ),
  'next' => 
  array (
    0 => 'sqlite3.escapestring.php',
    1 => 'SQLite3::escapeString',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/sqlite3/sqlite3/enableExceptions.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="sqlite3.enableexceptions" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">SQLite3::enableExceptions</h1>
  <p class="verinfo">(PHP 5 &gt;= 5.3.0, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">SQLite3::enableExceptions</span> &mdash; <span class="dc-title">
   Enable throwing exceptions
  </span></p>

 </div>

 <div class="refsect1 description" id="refsect1-sqlite3.enableexceptions-description">
  <h3 class="title">Açıklama</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>SQLite3::enableExceptions</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span> <code class="parameter">$enable</code><span class="initializer"> = <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong></span></span>): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>

  <p class="para rdfs-comment">
   Controls whether the <span class="classname"><a href="class.sqlite3.php" class="classname">SQLite3</a></span> instance will
   throw exceptions or warnings on error.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-sqlite3.enableexceptions-parameters">
  <h3 class="title">Bağımsız Değişkenler</h3>
  <dl>
   
    <dt><code class="parameter">enable</code></dt>
    <dd>
     <p class="para">
      When <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong>, the <span class="classname"><a href="class.sqlite3.php" class="classname">SQLite3</a></span> instance, and 
      <span class="classname"><a href="class.sqlite3stmt.php" class="classname">SQLite3Stmt</a></span> and <span class="classname"><a href="class.sqlite3result.php" class="classname">SQLite3Result</a></span>
      instances derived from it, will throw exceptions on error.
     </p>
     <p class="para">
      When <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong>, the <span class="classname"><a href="class.sqlite3.php" class="classname">SQLite3</a></span> instance, and
      <span class="classname"><a href="class.sqlite3stmt.php" class="classname">SQLite3Stmt</a></span> and <span class="classname"><a href="class.sqlite3result.php" class="classname">SQLite3Result</a></span>
      instances derived from it, will raise warnings on error.
     </p>
     <p class="para">
      For either mode, the error code and message, if any, will be available via
      <span class="methodname"><a href="sqlite3.lasterrorcode.php" class="methodname">SQLite3::lastErrorCode()</a></span> and
      <span class="methodname"><a href="sqlite3.lasterrormsg.php" class="methodname">SQLite3::lastErrorMsg()</a></span> respectively.
     </p>
    </dd>
   
  </dl>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-sqlite3.enableexceptions-returnvalues">
  <h3 class="title">Dönen Değerler</h3>
  <p class="para">
   Returns the old value; <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> if exceptions were enabled, <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> otherwise.
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-sqlite3.enableexceptions-changelog">
  <h3 class="title">Sürüm Bilgisi</h3>
  <table class="doctable informaltable">
   
    <thead>
     <tr>
      <th>Sürüm: </th>
      <th>Açıklama</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
      <td>8.3.0</td>
      <td>
       Calling <span class="methodname"><strong>SQLite3::enableExceptions()</strong></span> with <code class="parameter">enable</code>
       as <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> will trigger a <strong><code><a href="errorfunc.constants.php#constant.e-deprecated">E_DEPRECATED</a></code></strong> warning.
      </td>
     </tr>

    </tbody>
   
  </table>

 </div>


 <div class="refsect1 examples" id="refsect1-sqlite3.enableexceptions-examples">
  <h3 class="title">Örnekler</h3>
  <div class="example" id="sqlite3.enableexceptions.example.basic">
   <p><strong>Örnek 1 <span class="methodname"><strong>SQLite3::enableExceptions()</strong></span> example</strong></p>
   <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />$sqlite </span><span style="color: #007700">= new </span><span style="color: #0000BB">SQLite3</span><span style="color: #007700">(</span><span style="color: #DD0000">':memory:'</span><span style="color: #007700">);<br />try {<br />    </span><span style="color: #0000BB">$sqlite</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">exec</span><span style="color: #007700">(</span><span style="color: #DD0000">'create table foo'</span><span style="color: #007700">);<br />    </span><span style="color: #0000BB">$sqlite</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">enableExceptions</span><span style="color: #007700">(</span><span style="color: #0000BB">true</span><span style="color: #007700">);<br />    </span><span style="color: #0000BB">$sqlite</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">exec</span><span style="color: #007700">(</span><span style="color: #DD0000">'create table bar'</span><span style="color: #007700">);<br />} catch (</span><span style="color: #0000BB">Exception $e</span><span style="color: #007700">) {<br />    echo </span><span style="color: #DD0000">'Caught exception: ' </span><span style="color: #007700">. </span><span style="color: #0000BB">$e</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getMessage</span><span style="color: #007700">();<br />}<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
   </div>

   <div class="example-contents"><p>
Yukarıdaki örnek şuna benzer bir çıktı üretir:</p></div>
   <div class="example-contents screen">
<div class="examplescode"><pre class="examplescode">Warning: SQLite3::exec(): near &quot;foo&quot;: syntax error in example.php on line 4
Caught exception: near &quot;bar&quot;: syntax error</pre>
</div>
   </div>
  </div>
 </div>


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