I was unable to explain why this fails? I asked to it many peers and they too can't. I faced this situation when solving a kind of integration problem.
Consider $x=-x$
Then $x=0$
That is, $0=-0$
Now consider,
$$e^{\frac1x}=e^{\frac1x}$$ $$e^{\frac1x}=e^{-\frac1{-x}}$$ $$e^{\frac10}=e^{-\frac1{-0}}$$ Now since $0=-0$
$$e^{\frac10}=e^{-\frac1{0}}$$ $$e^\infty=e^{-\infty}$$ $$\infty=0$$
But how can this happen?
UPDATED: $$\lim_{x\to 0+}\frac1x=\infty$$ $$\lim_{x\to 0-}\frac1x=-\infty$$
Then what is?
$$\lim_{x\to 0}e^\frac1x=?$$
The function $\frac1x$ is not continuous at $0$, and not only that it is not continuous, it has different limits from each side.
Consider the function: $f(x)=\begin{cases} -1 & x<0\\0 & x=0\\ 1 & x> 0\end{cases}$
It is clear that: $$\lim_{x\to0^-}f(x)=-1\neq 0=f(0)\neq\lim_{x\to0^+}f(x)=1$$
There's no reason to expect that a function discontinuous at $0$ will satisfy $\lim_{x\to0^-}f(x)=\lim_{x\to0^+}f(x)$.
And while some functions can be extended continuously to have a value at $+\infty$ or $-\infty$ (and this value itself may or may not be $\pm\infty$); not all functions can be extended in such way.
And even if you can extend it, there is no guarantee that $f(+\infty)=f(-\infty)$. Which is exactly the case for $f(x)=e^x$.