1# -*- coding: utf-8 -*-
2class RFC3986Exception(Exception):
3    pass
4
5
6class InvalidAuthority(RFC3986Exception):
7    def __init__(self, authority):
8        super(InvalidAuthority, self).__init__(
9            "The authority ({0}) is not valid.".format(authority))
10
11
12class InvalidPort(RFC3986Exception):
13    def __init__(self, port):
14        super(InvalidPort, self).__init__(
15            'The port ("{0}") is not valid.'.format(port))
16
17
18class ResolutionError(RFC3986Exception):
19    def __init__(self, uri):
20        super(ResolutionError, self).__init__(
21            "{0} is not an absolute URI.".format(uri.unsplit()))
22