home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2009 June / maximum-cd-2009-06.iso / DiscContents / digsby_setup.exe / lib / social / facebook / fberrors.pyo (.txt) < prev    next >
Encoding:
Python Compiled Bytecode  |  2009-02-26  |  8.2 KB  |  143 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyo (Python 2.5)
  3.  
  4.  
  5. class FacebookError(Exception):
  6.     
  7.     def __init__(self, tag):
  8.         self.tag = tag
  9.         self.code = None if self.tag.error_code else 0
  10.         Exception.__init__(self)
  11.  
  12.     
  13.     def __repr__(self):
  14.         ret = '<FacebookError msg: %s / code: %d / meaning: %s>' % (self.tag.error_msg, self.code, error_codes.get(self.code, 'Unknown Error'))
  15.         return ret
  16.  
  17.  
  18.  
  19. class FacebookParseFail(FacebookError):
  20.     
  21.     def __init__(self, msg):
  22.         self.msg = msg
  23.  
  24.     
  25.     def __repr__(self):
  26.         return repr(self.msg)
  27.  
  28.  
  29. error_codes = {
  30.     0: 'Success',
  31.     1: 'An unknown error occurred',
  32.     2: 'Service temporarily unavailable',
  33.     3: 'Unknown method',
  34.     4: 'Application request limit reached',
  35.     5: 'Unauthorized source IP address',
  36.     6: 'This method must run on api.facebook.com',
  37.     7: 'This method must run on api-video.facebook.com',
  38.     8: 'This method requires an HTTPS connection',
  39.     9: 'User is performing too many actions',
  40.     10: 'Application does not have permission for this action',
  41.     11: 'This method is deprecated',
  42.     12: 'This API version is deprecated',
  43.     100: 'Invalid parameter',
  44.     101: 'Invalid API key',
  45.     102: 'Session key invalid or no longer valid',
  46.     103: 'Call_id must be greater than previous',
  47.     104: 'Incorrect signature',
  48.     105: 'The number of parameters exceeded the maximum for this operation',
  49.     110: 'Invalid user id photos.addTag',
  50.     111: 'Invalid user info field',
  51.     112: 'Invalid user field',
  52.     113: 'Invalid email',
  53.     120: 'Invalid album id',
  54.     121: 'Invalid photo id',
  55.     130: 'Invalid feed publication priority',
  56.     140: 'Invalid category',
  57.     141: 'Invalid subcategory',
  58.     142: 'Invalid title',
  59.     143: 'Invalid description',
  60.     144: 'Malformed JSON string',
  61.     150: 'Invalid eid',
  62.     151: 'Unknown city',
  63.     152: 'Invalid page type',
  64.     200: 'Permissions error',
  65.     210: 'User not visible',
  66.     220: 'Album or albums not visible',
  67.     221: 'Photo not visible',
  68.     230: 'Permissions disallow message to user',
  69.     240: 'Desktop applications cannot set FBML for other users',
  70.     250: 'Updating status requires the extended permission status_update. users.setStatus',
  71.     260: 'Modifying existing photos requires the extended permission photo_upload photos.upload, photos.addTag',
  72.     270: 'Permissions disallow sms to user.',
  73.     280: 'Creating and modifying listings requires the extended permission create_listing',
  74.     290: 'Creating and modifying events requires the extended permission create_event',
  75.     291: "FBML Template isn't owned by your application.",
  76.     292: 'An application is only allowed to send LiveMessages to users who have accepted the TOS for that application.',
  77.     299: 'RSVPing to events requires the extended permission create_rsvp',
  78.     300: 'Edit failure',
  79.     310: 'User data edit failure',
  80.     320: 'Photo edit failure',
  81.     321: 'Album is full',
  82.     322: 'Invalid photo tag subject',
  83.     323: 'Cannot tag photo already visible on Facebook',
  84.     324: 'Missing or invalid image file',
  85.     325: 'Too many unapproved photos pending',
  86.     326: 'Too many photo tags pending',
  87.     327: 'Input array contains a photo not in the album',
  88.     328: 'Input array has too few photos',
  89.     329: "Template data must be a JSON-encoded dictionary, of the form {'key-1': 'value-1', 'key-2': 'value-2', ...}",
  90.     330: 'Failed to set markup',
  91.     340: 'Feed publication request limit reached',
  92.     341: 'Feed action request limit reached',
  93.     342: 'Feed story title can have at most one href anchor',
  94.     343: 'Feed story title is too long',
  95.     344: 'Feed story title can have at most one fb:userlink and must be of the user whose action is being reported',
  96.     345: 'Feed story title rendered as blank',
  97.     346: 'Feed story body is too long',
  98.     347: 'Feed story photo could not be accessed or proxied',
  99.     348: 'Feed story photo link invalid',
  100.     350: 'Video file is too large',
  101.     351: 'Video file was corrupt or invalid',
  102.     352: 'Video file format is not supported',
  103.     360: 'Feed story title_data argument was not a valid JSON-encoded array',
  104.     361: 'Feed story title template either missing required parameters, or did not have all parameters defined in title_data array',
  105.     362: 'Feed story body_data argument was not a valid JSON-encoded array',
  106.     363: 'Feed story body template either missing required parameters, or did not have all parameters defined in body_data array',
  107.     364: 'Feed story photos could not be retrieved, or bad image links were provided',
  108.     365: 'The template for this story does not match any templates registered for this application',
  109.     366: 'One or more of the target ids for this story are invalid. They must all be ids of friends of the acting user',
  110.     370: 'The email address you provided is not a valid email address',
  111.     371: 'The email address you provided belongs to an existing account',
  112.     372: 'The birthday provided is not valid',
  113.     373: 'The password provided is too short or weak',
  114.     374: 'The login credential you provided is invalid.',
  115.     375: 'Failed to send confirmation message to the specified login credential.',
  116.     376: 'The login credential you provided belongs to an existing account',
  117.     377: 'Sorry, we were unable to process your registration.',
  118.     378: 'Your password cannot be blank. Please try another.',
  119.     379: 'Your password contains invalid characters. Please try another.',
  120.     380: 'Your password must be at least 6 characters long. Please try another.',
  121.     381: 'Your password should be more secure. Please try another.',
  122.     382: 'Our automated system will not approve this name.',
  123.     383: 'You must fill in all of the fields.',
  124.     384: 'You must indicate your full birthday to register.',
  125.     385: 'Please enter a valid email address.',
  126.     386: 'The email address you entered has been disabled. Please contact disabled@facebook.com with any questions.',
  127.     387: 'There was an error with your registration. Please try registering again.',
  128.     388: 'Please select either Male or Female.',
  129.     400: 'Invalid email address',
  130.     401: 'Invalid username or password',
  131.     402: 'Invalid application auth sig',
  132.     403: 'Invalid timestamp for authentication',
  133.     450: 'Session key specified has passed its expiration time',
  134.     600: 'An unknown error occurred in FQL',
  135.     601: 'Error while parsing FQL statement',
  136.     602: 'The field you requested does not exist',
  137.     603: 'The table you requested does not exist',
  138.     604: 'Your statement is not indexable',
  139.     605: 'The function you called does not exist',
  140.     606: 'Wrong number of arguments passed into the function',
  141.     700: 'Unknown failure in storing ref data. Please try again.',
  142.     950: 'Each batch API can not contain more than 20 items' }
  143.