Added simple try: except: error handling.

Signed-off-by: DavidJohnGee <david.gee@ipengineer.net>