I computed the following integral:
$$\int_{-2}^2 \frac{x^2+8x+1}{x^3}dx= \left[ \ln|x|-\frac{8}{x}-\frac{1}{2x^2} \right]_{-2}^2=\ln|2|-4-\frac{1}{8}-\ln|-2|-4+\frac{1}{8}=-8.$$
But when I integrate this using some integral calculator, I get that "the integral is divergent". I know the function is undefined on $x=0$, but according to Wikpedia the Fundamental Theorem of Calculus (https://en.wikipedia.org/wiki/Fundamental_theorem_of_calculus) applies if the set of discontinuities has measure zero, so I don't know what I'm missing.



Note the hypothesis
This is crucial: in particular, $f$ has to be Riemann integrable on the whole interval. In principle, merely knowing that there is a discontinuity doesn't disqualify $f$, but the particular kind of discontinuity you have is fatal.
(For the definition of "Riemann integrable," see here - the key point is that $f$ must be bounded in the interval we care about. Your function is unbounded in $[-2, 2]$.)