FileDocCategorySizeDatePackage
DcerpcException.javaAPI DocJCIFS 1.3.17 API2498Tue Oct 18 15:26:24 BST 2011jcifs.dcerpc

DcerpcException

public class DcerpcException extends IOException implements jcifs.smb.WinError, DcerpcError

Fields Summary
private int
error
private Throwable
rootCause
Constructors Summary
DcerpcException(int error)

        super(getMessageByDcerpcError(error));
        this.error = error;
    
public DcerpcException(String msg)

        super(msg);
    
public DcerpcException(String msg, Throwable rootCause)

        super(msg);
        this.rootCause = rootCause;
    
Methods Summary
public intgetErrorCode()

        return error;
    
static java.lang.StringgetMessageByDcerpcError(int errcode)

        int min = 0;
        int max = DCERPC_FAULT_CODES.length;

        while (max >= min) {
            int mid = (min + max) / 2;

            if (errcode > DCERPC_FAULT_CODES[mid]) {
                min = mid + 1;
            } else if (errcode < DCERPC_FAULT_CODES[mid]) {
                max = mid - 1;
            } else {
                return DCERPC_FAULT_MESSAGES[mid];
            }
        }

        return "0x" + Hexdump.toHexString(errcode, 8);
    
public java.lang.ThrowablegetRootCause()

        return rootCause;
    
public java.lang.StringtoString()

        if (rootCause != null) {
            StringWriter sw = new StringWriter();
            PrintWriter pw = new PrintWriter(sw);
            rootCause.printStackTrace(pw);
            return super.toString() + "\n" + sw;
        }
        return super.toString();