Allow application to override fail function and/or critical behaviour
Merge pull request #2 from davelxmos/failbehaviour

Allow application to override fail function and/or critical behaviour