Evaluating line integrals that are analytic "almost everywhere" using Cauchy's Theorem or Integral Formula? First off: I know that "almost everywhere" has a legitimate meaning in measure theory, but I'm not referring to that in this case, really. I'm talking about the case where there are only a small (finite) number of points where the function is not analytic inside a piecewise-smooth simple closed curve. 
I am wondering why we can't use Cauchy's Integral Formula or Cauchy's theorem in this case. 
Some examples of what I'm referring to:
a) $\int_\gamma f(z) dz = \int_\gamma \frac{e^{z^2}}{z(z-2)}dz$ where $\gamma(t) = 3+2e^{it}$, $0 \leq t \leq 2pi$
b) $\int_\gamma g(z) dz=\int_\gamma \frac{z^2 - 1}{z^2 + 1}$ where $\gamma(t) = 1-i+2e^{it}$, $0 \leq t \leq 2pi$
In the first instance, $f$ is analytic on $\mathbb{C} \setminus \{2\}$ but unfortunately, the curve $\gamma$, which is the circle of radius $2$ centred at $3$, includes this point. 
In the second instance, $g$ is analytic on $\mathbb{C} \setminus \{i, -i\}$ but, the curve, which is the circle of radius $2$ centred at $1-i$, includes these points.
I used WolframAlpha to evaluate the second integral using the standard definition of a line integral for a smooth curve, and got that the result is $2\pi$. 
My question is, why does having a small number of "holes" make the integral evaluate to a larger number (if there weren't any holes, it would have evaluated to 0 from Cauchy's Theorem)? It seems counterintuitive (given my understanding of integration in the reals).
Also, are there any tips or tricks for attacking these types of integrals? They are difficult to work with (computationally) which is why I was hoping to find a way to use some of the nicer formulae.   
 A: To begin with, none of the points are on the actual curves, i.e

a) $\gamma(t)=3+2e^{it}, 0\leq t\leq 2pi$ is

So $z_0=2$ is inside the disk surrounded by $\gamma$ ($0$ isn't). In this case Cauchy's integral formula applies
$$f(z_0)=\frac{1}{2\pi i } \int\limits_{\gamma}\frac{f(z)}{z-z_0}dz \tag{1}$$
where $f(z)=\frac{e^{z^2}}{z}$. Or 
$$\int\limits_{\gamma}\frac{e^{z^2}}{z(z-2)}dz=2 \pi i \cdot f(2)=\pi i e^4$$

b) $\gamma(t)=1-i+2e^{it}, 0\leq t\leq 2pi$ is

So $z_0=-i$ is inside the disk surrounded by $\gamma$ ($i$ isn't). Cauchy's integral formula $(1)$ applies again for $f(z)=\frac{z^2-1}{z-i}$. Or
$$\int\limits_{\gamma}\frac{z^2-1}{z^2+1}dz=2 \pi i \cdot f(-i)=2 \pi i \frac{-1-1}{-i-i}=2 \pi$$

As with regards to the question in bold, everything depends on the final result of applying residue theorem, assuming $f(z)$ meets the inputs of the theorem. $(1)$ is a particular case of it, to some extent. But the integral may evaluate to a complex number, in which case larger number doesn't make sense. 
