Add general phantom error handler