diff options
author | matthew <matthew> | 2007-09-03 21:03:31 +0000 |
---|---|---|
committer | matthew <matthew> | 2007-09-03 21:03:31 +0000 |
commit | 87f0d0a40f5d0b84b75e18a864c42c2b9f6a52b4 (patch) | |
tree | a3eb67f6bb81dc96c658dfe948b51636f7146bc3 /perllib/Page.pm | |
parent | 07d321ca2b1656c65ebe8829a743ee0e22befeae (diff) |
Better error message if someone enters a zipcode.
Diffstat (limited to 'perllib/Page.pm')
-rw-r--r-- | perllib/Page.pm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/perllib/Page.pm b/perllib/Page.pm index 04c91dc8d..b64b1f1f7 100644 --- a/perllib/Page.pm +++ b/perllib/Page.pm @@ -6,7 +6,7 @@ # Copyright (c) 2006 UK Citizens Online Democracy. All rights reserved. # Email: matthew@mysociety.org; WWW: http://www.mysociety.org/ # -# $Id: Page.pm,v 1.64 2007-09-03 20:56:30 matthew Exp $ +# $Id: Page.pm,v 1.65 2007-09-03 21:03:31 matthew Exp $ # package Page; @@ -537,8 +537,10 @@ sub geocode_string { $y = int($yy); $x -= 1 if ($xx - $x < 0.5); $y -= 1 if ($yy - $y < 0.5); - } catch { + } catch Error::Simple with { $error = shift; + $error = "That location doesn't appear to be in Britain; please try again." + if $error =~ /out of the area covered/; } } } |