All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.starxmind.piano.wechat.client.response.WechatResponse Maven / Gradle / Ivy

The newest version!
package com.starxmind.piano.wechat.client.response;

import com.starxmind.piano.wechat.client.exceptions.WechatClientException;
import lombok.Data;

/**
 * TODO
 *
 * @author pizzalord
 * @since 1.0
 */
@Data
public class WechatResponse {
    private int errcode;
    private String errmsg;

    public void ok() {
        if (this.errcode != 0) {
            throw new WechatClientException(
                    String.format(
                            "Fatal: an error occurred while fetching wechat server, error code: %s, error message: %s",
                            this.errcode, this.errmsg)
            );
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy