projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b108f32
)
better error handling on U.S. Census geocoding, #32250
author
Mark Wells
<mark@freeside.biz>
Tue, 7 Apr 2015 00:26:42 +0000
(17:26 -0700)
committer
Mark Wells
<mark@freeside.biz>
Tue, 7 Apr 2015 00:29:37 +0000
(17:29 -0700)
FS/FS/Misc/Geo.pm
patch
|
blob
|
history
diff --git
a/FS/FS/Misc/Geo.pm
b/FS/FS/Misc/Geo.pm
index
fc80548
..
1aa5939
100644
(file)
--- a/
FS/FS/Misc/Geo.pm
+++ b/
FS/FS/Misc/Geo.pm
@@
-334,8
+334,12
@@
sub standardize_uscensus {
censustract => $result->censustract,
};
} else {
censustract => $result->censustract,
};
} else {
- die "
can't parse address '".$result->address."'
";
+ die "
Geocoding returned '".$result->address."', which does not seem to be a valid address.\n
";
}
}
+ } elsif ( $result->match_level eq 'Tie' ) {
+ die "Geocoding was not able to identify a unique matching address.\n";
+ } elsif ( $result->match_level ) {
+ die "Geocoding did not find a matching address.\n";
} else {
warn Dumper($result) if $DEBUG;
die $result->error_message;
} else {
warn Dumper($result) if $DEBUG;
die $result->error_message;