Prove that : $ \mathop{\int}\limits_{L}{\frac{dz}{{z}^{2}\mathrm{{+}}{1}}}\mathrm{{=}}{0} $
If $ L $ is an arbitrary closed rectifiable curve contained in the annulus $ {1}\mathrm{{<}}\left|{z}\right|\mathrm{{<}}{R}\hspace{0.33em}\hspace{0.33em}{\mathrm{(}}{R}\mathrm{{>}}{1}{\mathrm{)}} $
but not if $ L $ is an arbitrary closed rectifiable curve contained in the domain consisting of all points such that $ {z}^{2}\mathrm{{+}}{1}\rlap{/}{\mathrm{{=}}}{0}{\mathrm{.}} $
As $L$ is compact, $dist(L, \partial D(0,1))>0$ and so $L \subset D:= \Bbb C\setminus \overline{D(0,1)}$, on which $z \mapsto \frac1{z^2+1}$ is holomorphic and so Cauchy's integral theorem applies.
If $L$ is just in $\Bbb C\setminus \{-1,1\}$, it can't necessarily be put inside a domain on which the map is holomorphic, and Cauchy's integral theorem doesn't apply. Try for a counterexample $L=\partial D(1, 1/2)$.