package com.cloudcc.core;

import java.util.List;

public class BusiException extends BaseException {
    private static final long serialVersionUID = -4060192906349249047L;

    public BusiException() {
    }

    public BusiException(String errmsg) {
        super(errmsg);
    }

    public BusiException(Throwable cause) {
        super(cause);
    }

    public BusiException(String errmsg, Throwable cause) {
        super(errmsg, cause);
    }

    public String toString() {
        StringBuffer sb = new StringBuffer();
        List messageArgs = this.getMessageArgs();

        for(int i = 0; i < messageArgs.size(); ++i) {
            sb.append("\t").append((String)messageArgs.get(i)).append("\n");
        }

        sb.append("\n\n");
        Throwable t = this.getRootCause();
        if (t != null) {
            StackTraceElement[] ste = t.getStackTrace();

            for(int i = 0; i < ste.length; ++i) {
                sb.append("\t").append(ste[i]).append("\n");
            }
        }

        return sb.toString();
    }
}