<filename>pyap/exceptions.py
# -*- coding: utf-8 -*-

"""
    pyap.exceptions
    ~~~~~~~~~~~~~~~~

    This module contains address parser exceptions.

    :copyright: (c) 2015 by <NAME>.
    :license: MIT, see LICENSE for more details.
"""


class AddressParserException(Exception):
    pass


class NoCountrySelected(AddressParserException):
    ''' No country selected during module initialization '''
    def __init__(self, message, errors):
        super(NoCountrySelected, self).__init__(message)
        self.errors = errors


class CountryDetectionMissing(AddressParserException):
    ''' Country-specific address detection rules were not found '''
    def __init__(self, message, errors):
        super(CountryDetectionMissing, self).__init__(message)
        self.errors = errors

<filename>pyap/exceptions.py
# -*- coding: utf-8 -*-

"""
    pyap.exceptions
    ~~~~~~~~~~~~~~~~

    This module contains address parser exceptions.

    :copyright: (c) 2015 by <NAME>.
    :license: MIT, see LICENSE for more details.
"""


class AddressParserException(Exception):
    pass


class NoCountrySelected(AddressParserException):
    ''' No country selected during module initialization '''
    def __init__(self, message, errors):
        super(NoCountrySelected, self).__init__(message)
        self.errors = errors


class CountryDetectionMissing(AddressParserException):
    ''' Country-specific address detection rules were not found '''
    def __init__(self, message, errors):
        super(CountryDetectionMissing, self).__init__(message)
        self.errors = errors

# -*- coding: utf-8 -*- pyap.exceptions     ~~~~~~~~~~~~~~~~      This module contains address parser exceptions.      :copyright: (c) 2015 by <NAME>.     :license: MIT, see LICENSE for more details. No country selected during module initialization Country-specific address detection rules were not found