import dbc import traceback print("---- CHECK ---") try: dbc.check(1 == 2, "Check Failed!") except dbc.CheckError as e: print("Check failure:", e) print("---- SENTINEL ---") try: dbc.sentinel() except dbc.SentinelError as e: print("Sentinel failure:", e) print("---- PRECOND ---") try: dbc.pre(1 == 2, "Pre Failed!") except dbc.PreError as e: print("Pre condition failure: ", e) print("---- POSTCOND ---") try: dbc.post(1 == 2, "Post Failed!") except dbc.PostError as e: print("Post condition failure:", e)