You may use try..catch
...
try
;;do_something with ets table, e.g. ets:update_counter
ets:update_counter(mytable, mycounter, 1)
catch
error:badarg -> init_mytables()
end.
...
or more specific catch
...
case (catch ets:update_counter(mytable, mycounter, 1)) of
{'EXIT', {badarg, ...}} ->
...
Cheers!