Package jcifs.smb
Class SmbException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.io.IOException
-
- jcifs.CIFSException
-
- jcifs.smb.SmbException
-
- All Implemented Interfaces:
Serializable
,DosError
,NtStatus
,WinError
- Direct Known Subclasses:
DfsReferral
,SmbAuthException
,SmbEndOfFileException
,SMBSignatureValidationException
,SmbUnsupportedOperationException
public class SmbException extends CIFSException implements NtStatus, DosError, WinError
There are hundreds of error codes that may be returned by a CIFS server. Rather than represent each with it's ownException
class, this class represents all of them. For many of the popular error codes, constants and text messages like "The device is not ready" are provided.The jCIFS client maps DOS error codes to NTSTATUS codes. This means that the user may receive a different error from a legacy server than that of a newer variant such as Windows NT and above. If you should encounter such a case, please report it to jcifs at samba dot org and we will change the mapping.
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface jcifs.smb.DosError
DOS_ERROR_CODES, DOS_ERROR_MESSAGES
-
Fields inherited from interface jcifs.smb.NtStatus
NT_STATUS_ACCESS_DENIED, NT_STATUS_ACCESS_VIOLATION, NT_STATUS_ACCOUNT_DISABLED, NT_STATUS_ACCOUNT_LOCKED_OUT, NT_STATUS_ACCOUNT_RESTRICTION, NT_STATUS_BAD_DEVICE_TYPE, NT_STATUS_BAD_NETWORK_NAME, NT_STATUS_BUFFER_OVERFLOW, NT_STATUS_BUFFER_TOO_SMALL, NT_STATUS_CANNOT_DELETE, NT_STATUS_CANT_ACCESS_DOMAIN_INFO, NT_STATUS_CODES, NT_STATUS_CONNECTION_REFUSED, NT_STATUS_DELETE_PENDING, NT_STATUS_DISK_FULL, NT_STATUS_DUPLICATE_NAME, NT_STATUS_END_OF_FILE, NT_STATUS_FILE_IS_A_DIRECTORY, NT_STATUS_INSTANCE_NOT_AVAILABLE, NT_STATUS_INVALID_COMPUTER_NAME, NT_STATUS_INVALID_HANDLE, NT_STATUS_INVALID_INFO_CLASS, NT_STATUS_INVALID_LOGON_HOURS, NT_STATUS_INVALID_PARAMETER, NT_STATUS_INVALID_PIPE_STATE, NT_STATUS_INVALID_SID, NT_STATUS_INVALID_WORKSTATION, NT_STATUS_IO_REPARSE_TAG_NOT_HANDLED, NT_STATUS_LOGON_FAILURE, NT_STATUS_LOGON_TYPE_NOT_GRANTED, NT_STATUS_MESSAGES, NT_STATUS_MORE_PROCESSING_REQUIRED, NT_STATUS_NETWORK_ACCESS_DENIED, NT_STATUS_NETWORK_NAME_DELETED, NT_STATUS_NO_LOGON_SERVERS, NT_STATUS_NO_MORE_FILES, NT_STATUS_NO_SUCH_ALIAS, NT_STATUS_NO_SUCH_DEVICE, NT_STATUS_NO_SUCH_DOMAIN, NT_STATUS_NO_SUCH_FILE, NT_STATUS_NO_SUCH_USER, NT_STATUS_NO_TRUST_SAM_ACCOUNT, NT_STATUS_NOLOGON_WORKSTATION_TRUST_ACCOUNT, NT_STATUS_NONE_MAPPED, NT_STATUS_NOT_A_DIRECTORY, NT_STATUS_NOT_FOUND, NT_STATUS_NOT_IMPLEMENTED, NT_STATUS_NOTIFY_ENUM_DIR, NT_STATUS_OBJECT_NAME_COLLISION, NT_STATUS_OBJECT_NAME_INVALID, NT_STATUS_OBJECT_NAME_NOT_FOUND, NT_STATUS_OBJECT_PATH_INVALID, NT_STATUS_OBJECT_PATH_NOT_FOUND, NT_STATUS_OBJECT_PATH_SYNTAX_BAD, NT_STATUS_OK, NT_STATUS_PASSWORD_EXPIRED, NT_STATUS_PASSWORD_MUST_CHANGE, NT_STATUS_PATH_NOT_COVERED, NT_STATUS_PENDING, NT_STATUS_PIPE_BROKEN, NT_STATUS_PIPE_BUSY, NT_STATUS_PIPE_CLOSING, NT_STATUS_PIPE_DISCONNECTED, NT_STATUS_PIPE_LISTENING, NT_STATUS_PIPE_NOT_AVAILABLE, NT_STATUS_PORT_DISCONNECTED, NT_STATUS_REQUEST_NOT_ACCEPTED, NT_STATUS_SHARING_VIOLATION, NT_STATUS_TRUSTED_DOMAIN_FAILURE, NT_STATUS_TRUSTED_RELATIONSHIP_FAILURE, NT_STATUS_UNSUCCESSFUL, NT_STATUS_USER_EXISTS, NT_STATUS_WRONG_PASSWORD
-
Fields inherited from interface jcifs.smb.WinError
ERROR_ACCESS_DENIED, ERROR_BAD_PIPE, ERROR_MORE_DATA, ERROR_NO_BROWSER_SERVERS_FOUND, ERROR_NO_DATA, ERROR_PIPE_BUSY, ERROR_PIPE_NOT_CONNECTED, ERROR_REQ_NOT_ACCEP, ERROR_SERVICE_NOT_INSTALLED, ERROR_SUCCESS, WINERR_CODES, WINERR_MESSAGES
-
-
Constructor Summary
Constructors Constructor Description SmbException()
SmbException(int errcode, boolean winerr)
SmbException(int errcode, Throwable rootCause)
SmbException(String msg)
SmbException(String msg, Throwable rootCause)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static String
getMessageByCode(int errcode)
int
getNtStatus()
Throwable
getRootCause()
Deprecated.-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
SmbException
public SmbException()
-
SmbException
public SmbException(int errcode, Throwable rootCause)
- Parameters:
errcode
-rootCause
-
-
SmbException
public SmbException(String msg)
- Parameters:
msg
-
-
SmbException
public SmbException(int errcode, boolean winerr)
- Parameters:
errcode
-winerr
-
-
-
Method Detail
-
getMessageByCode
public static String getMessageByCode(int errcode)
- Parameters:
errcode
-- Returns:
- message for NT STATUS code
-
getNtStatus
public int getNtStatus()
- Returns:
- status code
-
getRootCause
@Deprecated public Throwable getRootCause()
Deprecated.- Returns:
- cause
-
-