1 17 package org.alfresco.filesys.smb.server; 18 19 import org.alfresco.filesys.smb.SMBErrorText; 20 21 27 public class SMBSrvException extends Exception 28 { 29 private static final long serialVersionUID = 3976733662123341368L; 30 31 33 protected int m_errorclass; 34 35 37 protected int m_errorcode; 38 39 42 public SMBSrvException(int errclass, int errcode) 43 { 44 super(SMBErrorText.ErrorString(errclass, errcode)); 45 m_errorclass = errclass; 46 m_errorcode = errcode; 47 } 48 49 53 public SMBSrvException(int errclass, int errcode, String msg) 54 { 55 super(msg); 56 m_errorclass = errclass; 57 m_errorcode = errcode; 58 } 59 60 63 protected SMBSrvException(SMBSrvPacket pkt) 64 { 65 super(SMBErrorText.ErrorString(pkt.getErrorClass(), pkt.getErrorCode())); 66 m_errorclass = pkt.getErrorClass(); 67 m_errorcode = pkt.getErrorCode(); 68 } 69 70 75 public int getErrorClass() 76 { 77 return m_errorclass; 78 } 79 80 85 public int getErrorCode() 86 { 87 return m_errorcode; 88 } 89 90 95 public String getErrorText() 96 { 97 return SMBErrorText.ErrorString(m_errorclass, m_errorcode); 98 } 99 } | Popular Tags |