Add error when raising exception