Skip to content

Commit

Permalink
add exceptions to docs
Browse files Browse the repository at this point in the history
  • Loading branch information
chris48s committed Mar 25, 2018
1 parent f4a868e commit e306348
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions docs/docs/geocoders.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,21 @@ addressbase.models.DoesNotExist
>>> g.get_code('lad')
'W06000012'
```

## Exceptions

### CodesNotFoundException

Raised by `AddressBaseGeocoder.get_code()` if no records in the ONSUD are found correspoding to a record in AddressBase. Extends `uk_geo_utils.geocoders.AddressBaseException`.

### MultipleCodesException

Raised by `AddressBaseGeocoder.get_code()` if a single code of the given type can not be assigned to all of the UPRNs described by a postcode. Extends `uk_geo_utils.geocoders.AddressBaseException`.

### NorthernIrelandException

Raised by `AddressBaseGeocoder.__init__()` when attempting to construct an `AddressBaseGeocoder` object with a postcode starting 'BT'. AddressBase does not cover Northern Ireland. Extends `django.core.exceptions.ObjectDoesNotExist`

### AddressBaseNotImportedException

Raised by `AddressBaseGeocoder.__init__()` when attempting to construct an `AddressBaseGeocoder` object if there are no records in the AddressBase table. Extends `django.core.exceptions.ObjectDoesNotExist`

0 comments on commit e306348

Please sign in to comment.