home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2012 January / maximum-cd-2012-01.iso / DiscContents / digsby_setup.exe / lib / plugins / facebook / fberrors.pyo (.txt) < prev    next >
Encoding:
Python Compiled Bytecode  |  2011-10-05  |  12.4 KB  |  214 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyo (Python 2.6)
  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.     def message(self):
  19.         return self.tag.error_msg
  20.  
  21.     message = property(message)
  22.  
  23.  
  24. class FacebookParseFail(FacebookError):
  25.     
  26.     def __init__(self, msg):
  27.         self.msg = msg
  28.  
  29.     
  30.     def __repr__(self):
  31.         return repr(self.msg)
  32.  
  33.  
  34. error_codes = {
  35.     0: 'Success',
  36.     1: 'An unknown error occurred',
  37.     2: 'Service temporarily unavailable',
  38.     3: 'Unknown method',
  39.     4: 'Application request limit reached',
  40.     5: 'Unauthorized source IP address',
  41.     6: 'This method must run on api.facebook.com',
  42.     7: 'This method must run on api-video.facebook.com',
  43.     8: 'This method requires an HTTPS connection',
  44.     9: 'User is performing too many actions',
  45.     10: 'Application does not have permission for this action',
  46.     11: 'This method is deprecated',
  47.     12: 'This API version is deprecated',
  48.     100: 'Invalid parameter',
  49.     101: 'Invalid API key',
  50.     102: 'Session key invalid or no longer valid',
  51.     103: 'Call_id must be greater than previous',
  52.     104: 'Incorrect signature',
  53.     105: 'The number of parameters exceeded the maximum for this operation',
  54.     110: 'Invalid user id',
  55.     111: 'Invalid user info field',
  56.     112: 'Invalid user field',
  57.     113: 'Invalid email',
  58.     120: 'Invalid album id',
  59.     121: 'Invalid photo id',
  60.     130: 'Invalid feed publication priority',
  61.     140: 'Invalid category',
  62.     141: 'Invalid subcategory',
  63.     142: 'Invalid title',
  64.     143: 'Invalid description',
  65.     144: 'Malformed JSON string',
  66.     150: 'Invalid eid',
  67.     151: 'Unknown city',
  68.     152: 'Invalid page type',
  69.     200: 'Permissions error',
  70.     210: 'User not visible',
  71.     211: 'Application has no developers.',
  72.     220: 'Album or albums not visible',
  73.     221: 'Photo not visible',
  74.     230: 'Permissions disallow message to user',
  75.     240: 'Desktop applications cannot set FBML for other users',
  76.     250: 'Updating status requires the extended permission status_update',
  77.     260: 'Modifying existing photos requires the extended permission photo_upload',
  78.     270: 'Permissions disallow sms to user.',
  79.     280: 'Creating and modifying listings requires the extended permission create_listing',
  80.     281: 'Managing notes requires the extended permission create_note.',
  81.     282: 'Managing shared items requires the extended permission share_item.',
  82.     290: 'Creating and modifying events requires the extended permission create_event',
  83.     291: "FBML Template isn't owned by your application.",
  84.     292: 'An application is only allowed to send LiveMessages to users who have accepted the TOS for that application.',
  85.     299: 'RSVPing to events requires the extended permission create_rsvp',
  86.     300: 'Edit failure',
  87.     310: 'User data edit failure',
  88.     320: 'Photo edit failure',
  89.     321: 'Album is full',
  90.     322: 'Invalid photo tag subject',
  91.     323: 'Cannot tag photo already visible on Facebook',
  92.     324: 'Missing or invalid image file',
  93.     325: 'Too many unapproved photos pending',
  94.     326: 'Too many photo tags pending',
  95.     327: 'Input array contains a photo not in the album',
  96.     328: 'Input array has too few photos',
  97.     329: "Template data must be a JSON-encoded dictionary, of the form {'key-1': 'value-1', 'key-2': 'value-2', ...}",
  98.     330: 'Failed to set markup',
  99.     340: 'Feed publication request limit reached',
  100.     341: 'Feed action request limit reached',
  101.     342: 'Feed story title can have at most one href anchor',
  102.     343: 'Feed story title is too long',
  103.     344: 'Feed story title can have at most one fb:userlink and must be of the user whose action is being reported',
  104.     345: 'Feed story title rendered as blank',
  105.     346: 'Feed story body is too long',
  106.     347: 'Feed story photo could not be accessed or proxied',
  107.     348: 'Feed story photo link invalid',
  108.     350: 'Video file is too large',
  109.     351: 'Video file was corrupt or invalid',
  110.     352: 'Video file format is not supported',
  111.     360: 'Feed story title_data argument was not a valid JSON-encoded array',
  112.     361: 'Feed story title template either missing required parameters, or did not have all parameters defined in title_data array',
  113.     362: 'Feed story body_data argument was not a valid JSON-encoded array',
  114.     363: 'Feed story body template either missing required parameters, or did not have all parameters defined in body_data array',
  115.     364: 'Feed story photos could not be retrieved, or bad image links were provided',
  116.     365: 'The template for this story does not match any templates registered for this application',
  117.     366: 'One or more of the target ids for this story are invalid. They must all be ids of friends of the acting user',
  118.     370: 'The email address you provided is not a valid email address',
  119.     371: 'The email address you provided belongs to an existing account',
  120.     372: 'The birthday provided is not valid',
  121.     373: 'The password provided is too short or weak',
  122.     374: 'The login credential you provided is invalid.',
  123.     375: 'Failed to send confirmation message to the specified login credential.',
  124.     376: 'The login credential you provided belongs to an existing account',
  125.     377: 'Sorry, we were unable to process your registration.',
  126.     378: 'Your password cannot be blank.  Please try another.',
  127.     379: 'Your password contains invalid characters.  Please try another.',
  128.     380: 'Your password must be at least 6 characters long.  Please try another.',
  129.     381: 'Your password should be more secure.  Please try another.',
  130.     382: 'Our automated system will not approve this name.',
  131.     383: 'You must fill in all of the fields.',
  132.     384: 'You must indicate your full birthday to register.',
  133.     385: 'Please enter a valid email address.',
  134.     386: 'The email address you entered has been disabled. Please contact disabled@facebook.com with any questions.',
  135.     387: 'There was an error with your registration. Please try registering again.',
  136.     388: 'Please select either Male or Female.',
  137.     400: 'Invalid email address',
  138.     401: 'Invalid username or password',
  139.     402: 'Invalid application auth sig',
  140.     403: 'Invalid timestamp for authentication',
  141.     450: 'Session key specified has passed its expiration time',
  142.     451: 'Session key specified cannot be used to call this method',
  143.     452: 'Session key invalid. This could be because the session key has an incorrect format, or because the user has revoked this session',
  144.     453: 'A session key is required for calling this method',
  145.     454: 'A session key must be specified when request is signed with a session secret',
  146.     455: 'A session secret is not permitted to be used with this type of session key',
  147.     500: 'Message contains banned content',
  148.     501: 'Missing message body',
  149.     502: 'Message is too long',
  150.     503: 'User has sent too many messages',
  151.     504: 'Invalid reply thread id',
  152.     505: 'Invalid message recipient',
  153.     510: 'Invalid poke recipient',
  154.     511: 'There is a poke already outstanding',
  155.     512: 'User is poking too fast',
  156.     600: 'An unknown error occurred in FQL',
  157.     601: 'Error while parsing FQL statement',
  158.     602: 'The field you requested does not exist',
  159.     603: 'The table you requested does not exist',
  160.     604: 'Your statement is not indexable',
  161.     605: 'The function you called does not exist',
  162.     606: 'Wrong number of arguments passed into the function',
  163.     607: 'FQL field specified is invalid in this context.',
  164.     608: 'An invalid session was specified',
  165.     700: 'Unknown failure in storing ref data. Please try again.',
  166.     750: 'Unknown Facebook application integration failure.',
  167.     751: 'Fetch from remote site failed.',
  168.     752: 'Application returned no data.  This may be expected or represent a connectivity error.',
  169.     753: 'Application returned user had invalid permissions to complete the operation.',
  170.     754: 'Application returned data, but no matching tag found.  This may be expected.',
  171.     755: 'The database for this object failed.',
  172.     800: 'Unknown data store API error',
  173.     801: 'Invalid operation',
  174.     802: 'Data store allowable quota was exceeded',
  175.     803: 'Specified object cannot be found',
  176.     804: 'Specified object already exists',
  177.     805: 'A database error occurred. Please try again',
  178.     806: 'Unable to add FBML template to template database.  Please try again.',
  179.     807: 'No active template bundle with that ID or handle exists.',
  180.     808: 'Template bundle handles must contain less than or equal to 32 characters.',
  181.     809: 'Template bundle handle already identifies a previously registered template bundle, and handles can not be reused.',
  182.     810: 'Application has too many active template bundles, and some must be deactivated before new ones can be registered.',
  183.     811: 'One of more of the supplied action links was improperly formatted.',
  184.     812: 'One or more of your templates is using a token reserved by Facebook, such as {*mp3*} or {*video*}.',
  185.     850: 'Invalid sms session.',
  186.     851: 'Invalid sms message length.',
  187.     852: 'Over user daily sms quota.',
  188.     853: 'Unable to send sms to user at this time.',
  189.     854: 'Over application daily sms quota/rate limit.',
  190.     855: 'User is not registered for Facebook Mobile Texts',
  191.     856: 'User has SMS notifications turned off',
  192.     857: 'SMS application disallowed by mobile operator',
  193.     900: 'No such application exists.',
  194.     950: 'Each batch API can not contain more than 20 items',
  195.     951: 'begin_batch already called, please make sure to call end_batch first.',
  196.     952: 'end_batch called before begin_batch.',
  197.     953: 'This method is not allowed in batch mode.',
  198.     1000: 'Invalid time for an event.',
  199.     1050: 'No information has been set for this user',
  200.     1051: 'Setting info failed. Check the formatting of your info fields.',
  201.     1100: 'An error occurred while sending the LiveMessage.',
  202.     1101: 'The event_name parameter must be no longer than 128 bytes.',
  203.     1102: 'The message parameter must be no longer than 1024 bytes.',
  204.     1200: 'An error occurred while sending the message.',
  205.     1201: 'You have created too many pages',
  206.     1500: 'The url you supplied is invalid',
  207.     1600: 'The user does not have permission to modify this note.',
  208.     1700: 'An unknown error has occurred.',
  209.     1701: 'The specified post was too long.',
  210.     1702: 'The comments database is down.',
  211.     1703: 'The specified xid is not valid. xids can only contain letters, numbers, and underscores',
  212.     1704: 'The specified user is not a user of this application',
  213.     1705: 'There was an error during posting.' }
  214.