We know that Fourier Transform of $e^{ixt}$, where $x$ is a real parameter, $t\in \mathbb R$ is
$$\int_{-\infty}^{+\infty} e^{ixt} e^{-i \omega t} dt=\int_{-\infty}^{+\infty} e^{ixt-i \omega t} dt=\int_{-\infty}^{+\infty} e^{i(x- \omega )t} dt=2 \pi \delta(x- \omega)$$ The result is the same if you consider the following integral? $$\int_{-\pi}^{+\pi} e^{ixt} e^{-i \omega t} dt$$
$$ \color{#00f}{\large\mbox{No}}.\quad\mbox{The last one is equal to}\quad \left\lbrace\begin{array}{lcl} 2\,{\sin\left(\left[x - \omega\right]\pi\right) \over x - \omega} & \mbox{if} & x \not= \omega \\[3mm] 2\pi & \mbox{if} & x = \omega \end{array}\right. $$