Micro-Credit Enterprise number returns an error message class encapsulation _java based on the error code

Source: Internet
Author: User
Tags button type

Micro-Credit Enterprise Returns an error message class wrapper based on the error code

The error code returned in the development of the micro-credit will not know the specific error message each time you need to query for the error return code document (see the Returned errormsg also know), so encapsulate a

The error code returns the class to view!

Pure manual!!!.

<span style= "FONT-SIZE:14PX;" 
>package org.oms.wechat.utils; /** * Enterprise Number returns an error message class * @author Sunlight * * */public class Errorcodetext {public static String errormsg (int E 
    Rrorcode) {String errmsg = ""; 
      Switch (errorcode) {case-1: ErrMsg = "System Busy"; 
    Break 
      Case 0:errmsg = "Successful request"; 
    Break 
      Case 40001:errmsg = "Secret error when acquiring Access_token, or access_token invalid"; 
    Break 
      Case 40002:errmsg = "illegal voucher type"; 
    Break 
      Case 40003:errmsg = "unlawful userid"; 
    Break 
      Case 40004:errmsg = "Illegal media file type"; 
    Break 
      Case 40005:errmsg = "illegal file type"; 
    Break 
      Case 40006:errmsg = "illegal file size"; 
    Break 
      Case 40007:errmsg = "Illegal media file ID"; 
    Break 
      Case 40008:errmsg = "illegal message type"; 
    Break 
      Case 40013:errmsg = "unlawful corpid"; 
    Break 
      Case 40014:errmsg = "unlawful Access_token"; Break 
    Case 40015:errmsg = "illegal menu type"; 
    Break 
      Case 40016:errmsg = "Illegal number of buttons"; 
    Break 
      Case 40017:errmsg = "illegal button type"; 
    Break 
      Case 40018:errmsg = "illegal button name length"; 
    Break 
      Case 40019:errmsg = "illegal button key length"; 
    Break 
      Case 40020:errmsg = "illegal button URL length"; 
    Break 
      Case 40021:errmsg = "illegal menu version number"; 
    Break 
      Case 40022:errmsg = "Illegal sub-menu series"; 
    Break 
      Case 40023:errmsg = "Number of illegal submenu buttons"; 
    Break 
      Case 40024:errmsg = "Illegal submenu button type"; 
    Break 
      Case 40025:errmsg = "Illegal submenu button name length"; 
    Break 
      Case 40026:errmsg = "Illegal submenu button key Length"; 
    Break 
      Case 40027:errmsg = "Illegal submenu button URL length"; 
    Break 
      Case 40028:errmsg = "Illegal custom menu use employee"; 
    Break 
      Case 40029:errmsg = "unlawful Oauth_code"; 
    Break 
      Case 40031:errmsg = "illegal userid list"; 
    BreakCase 40032:errmsg = "illegal userid list Length"; 
    Break 
      Case 40033:errmsg = "Illegal request character, cannot contain characters in \\uxxxx format"; 
    Break 
      Case 40035:errmsg = "illegal parameter"; 
    Break 
      Case 40038:errmsg = "illegal request format"; 
    Break 
      Case 40039:errmsg = "illegal URL length"; 
    Break 
      Case 40040:errmsg = "illegal plug-in token"; 
    Break 
      Case 40041:errmsg = "illegal plugin id"; 
    Break 
      Case 40042:errmsg = "illegal plug-in session"; 
    Break 
      Case 40048:errmsg = "URL contains illegal domain"; 
    Break 
      Case 40054:errmsg = "Illegal sub-menu URL domain name"; 
    Break 
      Case 40055:errmsg = "illegal button URL domain name"; 
    Break 
      Case 40056:errmsg = "unlawful Agentid"; 
    Break 
      Case 40057:errmsg = "unlawful Callbackurl"; 
    Break 
      Case 40058:errmsg = "illegal red envelope parameter"; 
    Break 
      Case 40059:errmsg = "illegal escalation of geographical position sign"; 
    Break Case 40060:errmsg = "Setting escalation location flag bit is not set CallbackurL "; 
    Break 
      Case 40061:errmsg = "Set application avatar failed"; 
    Break 
      Case 40062:errmsg = "illegal application Mode"; 
    Break 
      Case 40063:errmsg = "Red envelope parameter is empty"; 
    Break 
      Case 40064:errmsg = "Admin Group name already exists"; 
    Break 
      Case 40065:errmsg = "Illegal management group name length"; 
    Break 
      Case 40066:errmsg = "illegal Department list"; 
    Break 
      Case 40067:errmsg = "title length is not valid"; 
    Break 
      Case 40068:errmsg = "illegal label ID"; 
    Break 
      Case 40069:errmsg = "Illegal label ID list"; 
    Break 
      Case 40070:errmsg = "All tags (user) IDs in the list are not valid"; 
    Break 
      Case 40071:errmsg = "Illegal label name, label name already exists"; 
    Break 
      Case 40072:errmsg = "Illegal label name length"; 
    Break 
      Case 40073:errmsg = "illegal OpenID"; 
    Break 
      Case 40074:errmsg = "news message does not support designation as high secret message"; 
    Break 
      Case 41001:errmsg = "missing access_token parameter"; 
    Break 
    Case 41002:errmsg = "missing corpid parameter";  Break 
      Case 41003:errmsg = "missing refresh_token parameter"; 
    Break 
      Case 41004:errmsg = "missing secret parameter"; 
    Break 
      Case 41005:errmsg = "lack of multimedia file data"; 
    Break 
      Case 41006:errmsg = "missing media_id parameter"; 
    Break 
      Case 41007:errmsg = "Missing sub-menu data"; 
    Break 
      Case 41008:errmsg = "Missing OAuth code"; 
    Break 
      Case 41009:errmsg = "lack of userid"; 
    Break 
      Case 41010:errmsg = "Missing url"; 
    Break 
      Case 41011:errmsg = "lack of Agentid"; 
    Break 
      Case 41012:errmsg = "Missing application avatar MediaID"; 
    Break 
      Case 41013:errmsg = "lack of application name"; 
    Break 
      Case 41014:errmsg = "lack of application description"; 
    Break 
      Case 41015:errmsg = "missing content"; 
    Break 
      Case 41016:errmsg = "missing title"; 
    Break 
      Case 41017:errmsg = "missing tag id"; 
    Break 
      Case 41018:errmsg = "missing label name"; 
    Break Case 42001:errmsg = "a"Ccess_token timeout "; 
    Break 
      Case 42002:errmsg = "Refresh_token timeout"; 
    Break 
      Case 42003:errmsg = "Oauth_code timeout"; 
    Break 
      Case 42004:errmsg = "Plugin token timeout"; 
    Break 
      Case 43001:errmsg = "Need GET request"; 
    Break 
      Case 43002:errmsg = "POST request required"; 
    Break 
      Case 43003:errmsg = "Need https"; 
    Break 
      Case 43004:errmsg = "need recipient attention"; 
    Break 
      Case 43005:errmsg = "need friend relationship"; 
    Break 
      Case 43006:errmsg = "need to subscribe"; 
    Break 
      Case 43007:errmsg = "need authorization"; 
    Break 
      Case 43008:errmsg = "need to pay authorization"; 
    Break 
      Case 43009:errmsg = "Need staff has been concerned about"; 
    Break 
      Case 43010:errmsg = "need to be in callback mode"; 
    Break 
      Case 43011:errmsg = "Need Enterprise Authorization"; 
    Break 
      Case 44001:errmsg = "multimedia file is empty"; 
    Break 
      Case 44002:errmsg = "Post packet is empty"; 
    Break Case 44003:errmsg = "text message content is empty"; 
    Break 
      Case 44004:errmsg = "text message content is empty"; 
    Break 
      Case 45001:errmsg = "multimedia file size exceeds limit"; 
    Break 
      Case 45002:errmsg = "message content exceeding limit"; 
    Break 
      Case 45003:errmsg = "title field exceeds limit"; 
    Break 
      Case 45004:errmsg = "description field exceeds limit"; 
    Break 
      Case 45005:errmsg = "link field exceeds limit"; 
    Break 
      Case 45006:errmsg = "Picture link field exceeds limit"; 
    Break 
      Case 45007:errmsg = "Voice playback time exceeds limit"; 
    Break 
      Case 45008:errmsg = "text message exceeding limit"; 
    Break 
      Case 45009:errmsg = "interface invocation exceeds limit"; 
    Break 
      Case 45010:errmsg = "Create menu number exceeds limit"; 
    Break 
      Case 45015:errmsg = "Reply time exceeding limit"; 
    Break 
      Case 45016:errmsg = "system grouping, not allowed to modify"; 
    Break 
      Case 45017:errmsg = "group name is too long"; 
    Break 
      Case 45018:errmsg = "The number of packets exceeds the upper limit"; 
    Break 
      Case 45024:errmsg = "account number exceeds the upper limit"; 
    Break Case 46001:
      ErrMsg = "No media data exists"; 
    Break 
      Case 46002:errmsg = "nonexistent menu version"; 
    Break 
      Case 46003:errmsg = "nonexistent menu data"; 
    Break 
      Case 46004:errmsg = "nonexistent employee"; 
    Break 
      Case 47001:errmsg = "Parse json/xml content error"; 
    Break 
      Case 48002:errmsg = "API disabled"; 
    Break 
      Case 50001:errmsg = "Redirect_uri not authorized"; 
    Break 
      Case 50002:errmsg = "Employee does not have permission scope"; 
    Break 
      Case 50003:errmsg = "Application deactivated"; 
    Break 
      Case 50004:errmsg = "Employee status is not correct (not concerned about state)"; 
    Break 
      Case 50005:errmsg = "Enterprise Disabled"; 
    Break 
      Case 60001:errmsg = "department length does not conform to the limit"; 
    Break 
      Case 60002:errmsg = "departmental level depth exceeds limit"; 
    Break 
      Case 60003:errmsg = "department does not exist"; 
    Break 
      Case 60004:errmsg = "Father department does not exist"; 
    Break 
      Case 60005:errmsg = "do not allow deletion of departments with members"; 
    Break 
      Case 60006:errmsg = "do not allow deletion of departments with sub departments"; Break
    Case 60007:errmsg = "Delete Root department not allowed"; 
    Break 
      Case 60008:errmsg = "department name already exists"; 
    Break 
      Case 60009:errmsg = "department name contains illegal characters"; 
    Break 
      Case 60010:errmsg = "department exists circular relationship"; 
    Break 
      Case 60011:errmsg = "Insufficient Administrator rights, (user/department/agent) no permissions"; 
    Break 
      Case 60012:errmsg = "do not allow deletion of default application"; 
    Break 
      Case 60013:errmsg = "not allowed to close application"; 
    Break 
      Case 60014:errmsg = "not allowed to open application"; 
    Break 
      Case 60015:errmsg = "Do not allow modification of the default application visible range"; 
    Break 
      Case 60016:errmsg = "do not allow deletion of tags of existing members"; 
    Break 
      Case 60017:errmsg = "not allowed to set up enterprises"; 
    Break 
      Case 60102:errmsg = "UserID already exist"; 
    Break 
      Case 60103:errmsg = "mobile phone number is not legal"; 
    Break 
      Case 60104:errmsg = "mobile phone number already exists"; 
    Break 
      Case 60105:errmsg = "Mailbox is illegal"; 
    Break 
      Case 60106:errmsg = "Mailbox already exists"; 
    Break Case 60107:errmsg = "micro-signal is not legal"; 
    Break 
      Case 60108:errmsg = "micro-signal already exists"; 
    Break 
      Case 60109:errmsg = "QQ number already exists"; 
    Break 
      Case 60110:errmsg = "Number of departments exceeding limit"; 
    Break 
      Case 60111:errmsg = "UserID does not exist"; 
    Break 
      Case 60112:errmsg = "Member name is not lawful"; 
    Break 
      Case 60113:errmsg = "Identity authentication information (micro-signal/Cell phone/mailbox) can not be empty at the same time"; 
    Break 
      Case 60114:errmsg = "sex is illegal"; 
 
    Break Default:errmsg = "No This error code!" 
      "; 
    Break 
  return errmsg; 
 }} </span>

Thank you for reading, I hope to help you, thank you for your support for this site!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.