Solution (source code)

= Solution

A <function> $f:U\to\mathbb C$ is holomorphic when it is complex <differentiable> at every point of the open connected set $U$. <Morera's theorem> states that a <continuous function> on a domain is holomorphic if its <integral> around every triangle whose interior lies in the domain is zero.

The integrand $e^{tz}/(1+t^2)$ is continuous jointly in $(t,z)$ on $[0,1]\times\mathbb C$, so the displayed <integral> defines a <continuous function>. For any triangle $T$, Fubini's theorem and the Cauchy <integral> theorem give
$$
\int_{\partial T}f(z)\,dz
=\int_0^1\frac1{1+t^2}
\left(\int_{\partial T}e^{tz}\,dz\right)dt
=0.
$$
Morera's theorem therefore proves that $f$ is entire.

The <function> $1/z$ is holomorphic on $\mathbb C\setminus\{0\}$ but has no antiderivative there, because an antiderivative would integrate to zero around every closed curve whereas
$$
\int_{|z|=1}\frac{dz}{z}=2\pi i.
$$
This is the standard <period obstruction to a holomorphic antiderivative>.