If the two one-sided limits are different, or if one (or both) of
them fail to exist, then the overall limit doesn't exist.

Note that the value of
$f(a)$ doesn't enter into this, and it doesn't matter whether
$f(a)$ is defined or not defined. Recall that when evaluating a
limit of $f$ as $x\to a$ we only care about what happens when $x$
is near $a$ (when $x$ is slightly less than $a$, or slightly
greater than $a$), not what happens when $x$ is equal to $a$.