@@ -0,0 +1,2125 @@
+# Copyright 2014 Google Inc. All rights reserved.%0A#%0A# Modifications Copyright (C) 2018 HeiGIT, University of Heidelberg.%0A#%0A#%0A# Licensed under the Apache License, Version 2.0 (the %22License%22); you may not%0A# use this file except in compliance with the License. You may obtain a copy of%0A# the License at%0A#%0A#     http://www.apache.org/licenses/LICENSE-2.0%0A#%0A# Unless required by applicable law or agreed to in writing, software%0A# distributed under the License is distributed on an %22AS IS%22 BASIS, WITHOUT%0A# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the%0A# License for the specific language governing permissions and limitations under%0A# the License.%0A#%0A%0A%22%22%22%0ADefines exceptions that are thrown by the ORS client.%0A%22%22%22%0A%0Aclass ApiError(Exception):%0A    %22%22%22Represents an exception returned by the remote API.%22%22%22%0A    def __init__(self, status, message=None):%0A        self.status = status%0A        self.message = message%0A%0A    def __str__(self):%0A        if self.message is None:%0A            return self.status%0A        else:%0A            return %22%25s (%25s)%22 %25 (self.status, self.message)%0A%0Aclass TransportError(Exception):%0A    %22%22%22Something went wrong while trying to execute the request.%22%22%22%0A%0A    def __init__(self, base_exception=None):%0A        self.base_exception = base_exception%0A%0A    def __str__(self):%0A        if self.base_exception:%0A            return str(self.base_exception)%0A%0A        return %22An unknown error occurred.%22%0A%0Aclass HTTPError(Exception):%0A    %22%22%22An unexpected HTTP error occurred.%22%22%22%0A    def __init__(self, status_code):%0A        self.status_code = status_code%0A%0A    def __str__(self):%0A        return %22HTTP Error: %25d%22 %25 self.status_code%0A%0Aclass Timeout(Exception):%0A    %22%22%22The request timed out.%22%22%22%0A    pass%0A%0Aclass _RetriableRequest(Exception):%0A    %22%22%22Signifies that the request can be retried.%22%22%22%0A    pass%0A%0Aclass _OverQueryLimit(ApiError, _RetriableRequest):%0A    %22%22%22Signifies that the request failed because the client exceeded its query rate limit.%0A%0A    Normally we treat this as a retriable condition, but we allow the calling code to specify that these requests should%0A    not be retried.%0A    %22%22%22%0A    pass%0A

add exceptions from openrouteservice-py