Replace raise with :erlang.raise