# Preconditions: Handling failures and errors

**URL:** <https://forum.liquibase.org/t/preconditions-handling-failures-and-errors/1232>\
**Category:** General Discussion\
**Created:** [April 16, 2011, 5:46pm UTC](https://forum.liquibase.org/t/preconditions-handling-failures-and-errors/1232 "2011-04-16T17:46:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Guest](https://avatars.discourse-cdn.com/v4/letter/g/8dc957/32.png) [@Guest](https://forum.liquibase.org/u/Guest)\
**Post date:** [April 16, 2011, 5:46pm UTC](https://forum.liquibase.org/t/preconditions-handling-failures-and-errors/1232/1 "2011-04-16T17:46:00Z")

</div>

Hi,  
  
I really appreciate your tool, as I was evaluating it for our application. Geat work.  
  
Now my question which I hope was not asked before (search did not bring up anything):  
  
Is it possible to assign different onFail actions, depending on which of the checks in the preconditions failed?  
  
Example:  
I want to add a column to a table, but it may happen in our environment, that the whole table does not exist.  
If the column (and so the table) already exists the change should be marked RAN. But if the whole table does not exist, CONTINUE, as the table could be added later on.  
  
My first approach was to have an onFail and onError attribute and then run the check

---

<div class="post-metadata">

**Author:** ![nvoxland](https://avatars.discourse-cdn.com/v4/letter/n/87869e/32.png) [@nvoxland](https://forum.liquibase.org/u/nvoxland)\
**Post date:** [April 16, 2011, 5:46pm UTC](https://forum.liquibase.org/t/preconditions-handling-failures-and-errors/1232/2 "2011-04-16T17:46:00Z")

</div>

In your example, I’m not sure why you can’t use RAN when the precondition fails regardless of whether it’s because the table doesn’t exist or the column doesn’t exist. Do you run liquibase twice to pick up the column changeSet you wanted to continue past on the second time through?

Nathan

---

<div class="post-metadata">

**Author:** ![Guest](https://avatars.discourse-cdn.com/v4/letter/g/8dc957/32.png) [@Guest](https://forum.liquibase.org/u/Guest)\
**Post date:** [April 16, 2011, 5:46pm UTC](https://forum.liquibase.org/t/preconditions-handling-failures-and-errors/1232/3 "2011-04-16T17:46:00Z")

</div>

Yes, exactly. It may happen, that the table will be added later on. Running again, should then add the column.
