# How to stop test case in catch block

**URL:** <https://forum.katalon.com/t/how-to-stop-test-case-in-catch-block/18291>\
**Category:** Web Testing\
**Tags:** katalon-studio\
**Created:** [January 25, 2019, 11:08am UTC](https://forum.katalon.com/t/how-to-stop-test-case-in-catch-block/18291 "2019-01-25T11:08:04Z")\
**Posts on this page:** 1\
**Showing post:** 12

<div class="post-metadata">

**Author:** ![duyluong](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/duyluong/32/1116_2.png) [@duyluong](https://forum.katalon.com/u/duyluong)\
**Post date:** [January 28, 2019, 7:51am UTC](https://forum.katalon.com/t/how-to-stop-test-case-in-catch-block/18291/12 "2019-01-28T07:51:58Z")

</div>

1. callTestCase will throw StepFailedException or StepErrorException if the child test case (callee) has errors.  
Current: the parent test case (caller) always fails even users catch the right exception.  
Next release: the parent test case should fail if users don’t catch the exception and should pass if uses catch the exception.
2. Yes. In next releases, users can get the root cause exception of StepFailedException or StepErrorException like the below example:

```java
try {
    WebUI.callTestCase(findTestCase('Callee'), [:], FailureHandling.STOP_ON_FAILURE)
} catch (StepFailedException e) {
	println e.getCause()
}

```

---

_[View the full topic](https://forum.katalon.com/t/how-to-stop-test-case-in-catch-block/18291)._
