capturing the exception