Show error when an exception occurs

fix #5