added shouldThrowError