="o">?-</span> <span class="k">catch</span>(type<span class="o">::</span>check(integer, abc), <span class="nv">Error</span>, <span class="k">true</span>).
<span class="nv">Error</span> <span class="o">=</span> <span class="k">type_error</span>(integer, abc)
yes
</pre></div>
</div>
<p>If we require a standard <code class="docutils literal notranslate"><span class="pre">error/2</span></code> exception term, the <code class="docutils literal notranslate"><span class="pre">check/3</span></code>
predicate takes 