Locator exception handling

Added new exception and wrapped Locator casts so that it can be thrown.