catch assert error.