forked from tschellenbach/Django-facebook
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathexceptions.py
42 lines (28 loc) · 828 Bytes
/
exceptions.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
class FacebookException(Exception):
'''
Base class for Facebook related exceptions
'''
pass
class IncompleteProfileError(FacebookException):
'''
Raised when we get insufficient data to create a profile for a user.
One example is a Facebook token, without permissions to see the email.
'''
pass
class AlreadyConnectedError(FacebookException):
'''
Raised when another user account is already connected to your Facebook id
'''
def __init__(self, users):
self.users = users
class AlreadyRegistered(FacebookException):
'''
Raised if you try to register when there's already an account with
the given email or facebook id
'''
pass
class MissingPermissionsError(FacebookException):
'''
Raised if we lack permissions
'''
pass