Title: Fallback function for errors
Last modified: August 31, 2016

---

# Fallback function for errors

 *  Resolved [Luke Seall](https://wordpress.org/support/users/lukelukeluke/)
 * (@lukelukeluke)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/fallback-function-for-errors/)
 * Hi, I need to know how to hook into the error function so if the ip lookup was
   unsuccessful I can display a popup to the user. Can you point me in the right
   direction?
 * Thanks
 * [https://wordpress.org/plugins/geoip-detect/](https://wordpress.org/plugins/geoip-detect/)

Viewing 1 replies (of 1 total)

 *  [Benjamin Pick](https://wordpress.org/support/users/benjamin4/)
 * (@benjamin4)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/fallback-function-for-errors/#post-7027562)
 * Depends on where in the theme you call the method etc.
    Something along the lines
   of:
 * <?php
    $ret = geoip_detect2_get_info_from_current_ip(); if ($ret->extra->error)
   echo ‘<script>alert(“Error”);</script>’;

Viewing 1 replies (of 1 total)

The topic ‘Fallback function for errors’ is closed to new replies.

 * ![](https://ps.w.org/geoip-detect/assets/icon-256x256.jpg?rev=978998)
 * [Geolocation IP Detection](https://wordpress.org/plugins/geoip-detect/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/geoip-detect/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/geoip-detect/)
 * [Active Topics](https://wordpress.org/support/plugin/geoip-detect/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/geoip-detect/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/geoip-detect/reviews/)

## Tags

 * [GeoIP Detection](https://wordpress.org/support/topic-tag/geoip-detection/)

 * 1 reply
 * 2 participants
 * Last reply from: [Benjamin Pick](https://wordpress.org/support/users/benjamin4/)
 * Last activity: [10 years, 4 months ago](https://wordpress.org/support/topic/fallback-function-for-errors/#post-7027562)
 * Status: resolved