**Yes.**  That is effectively an impure function.  It creates a side-effect: program execution continues somewhere other than the place to which the function is expected to return.

To make it a pure function, `return` an actual object that encapsulates the expected value from the function and a value indicating a possible error condition, like a `Maybe` object or a Unit of Work object.