# When does assert fail? Running out of space?

**URL:** <https://swi-prolog.discourse.group/t/when-does-assert-fail-running-out-of-space/1681>\
**Category:** Help!\
**Created:** [December 31, 2019, 4:48pm UTC](https://swi-prolog.discourse.group/t/when-does-assert-fail-running-out-of-space/1681 "2019-12-31T16:48:23Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![joeblog](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/joeblog/32/122_2.png) [@joeblog](https://swi-prolog.discourse.group/u/joeblog)\
**Post date:** [January 1, 2020, 9:14am UTC](https://swi-prolog.discourse.group/t/when-does-assert-fail-running-out-of-space/1681/9 "2020-01-01T09:14:42Z")

</div>

> [@grossdan](#):
>
> Catch doesn’t fail upon an exception – or does it ?

I’m not sure. I’ve used the code as above and it seems to work, but I’ve had to figure it out from trial and error.

[**catch** (:Goal, +Catcher, :Recover)](https://www.swi-prolog.org/pldoc/doc_for?object=catch/3) sadly seems to be another fundamental part of Prolog lacking simple, illustrative examples.

From Googling, I see you’ve asked for clarification on catch/throw here [https://swi-prolog.discourse.group/t/catch-throw-recover-until-its-suceeds/288](https://swi-prolog.discourse.group/t/catch-throw-recover-until-its-suceeds/288),and I’d also appreciate a clear answer on how to use catch.

---

_[View the full topic](https://swi-prolog.discourse.group/t/when-does-assert-fail-running-out-of-space/1681)._
