java.lang.Object
java.lang.Throwable
java.lang.Exception
java.io.IOException
org.codelibs.jcifs.smb.CIFSException
org.codelibs.jcifs.smb.impl.SmbException
- All Implemented Interfaces:
Serializable,DosError,NtStatus,WinError
- Direct Known Subclasses:
DfsReferral,SmbAuthException,SmbEndOfFileException,SMBSignatureValidationException,SmbUnsupportedOperationException
There are hundreds of error codes that may be returned by a CIFS
server. Rather than represent each with it's own
Exception
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:
-
Field Summary
Fields inherited from interface org.codelibs.jcifs.smb.impl.DosError
DOS_ERROR_CODES, DOS_ERROR_MESSAGESFields inherited from interface org.codelibs.jcifs.smb.impl.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_INSUFFICIENT_RESOURCES, 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_SUCCESS, NT_STATUS_TRUSTED_DOMAIN_FAILURE, NT_STATUS_TRUSTED_RELATIONSHIP_FAILURE, NT_STATUS_UNSUCCESSFUL, NT_STATUS_USER_EXISTS, NT_STATUS_WRONG_PASSWORDFields inherited from interface org.codelibs.jcifs.smb.impl.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
ConstructorsConstructorDescription/** Constructs an SmbException with no detail messageSmbException(int errcode, boolean winerr) Constructs an SmbException with the specified error codeSmbException(int errcode, Throwable rootCause) Constructs an SmbException with the specified error code and root causeSmbException(String msg) Constructs an SmbException with the specified detail messageSmbException(String msg, Throwable rootCause) Constructs an SmbException with the specified detail message and root cause -
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetMessageByCode(int errcode) Get the message string for an NT STATUS codeintGet the NT STATUS code associated with this exceptionDeprecated.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
SmbException
public SmbException()/** Constructs an SmbException with no detail message -
SmbException
Constructs an SmbException with the specified error code and root cause- Parameters:
errcode- the SMB error coderootCause- the underlying cause of this exception
-
SmbException
Constructs an SmbException with the specified detail message- Parameters:
msg- the detail message
-
SmbException
Constructs an SmbException with the specified detail message and root cause- Parameters:
msg- the detail messagerootCause- the underlying cause of this exception
-
SmbException
public SmbException(int errcode, boolean winerr) Constructs an SmbException with the specified error code- Parameters:
errcode- the error code (either SMB or Windows error code)winerr- true if errcode is a Windows error code, false if it's an SMB error code
-
-
Method Details
-
getMessageByCode
Get the message string for an NT STATUS code- Parameters:
errcode- the NT STATUS error code- Returns:
- message for NT STATUS code
-
getNtStatus
public int getNtStatus()Get the NT STATUS code associated with this exception- Returns:
- status code
-
getRootCause
Deprecated.Get the root cause of this exception (deprecated - use getCause() instead)- Returns:
- cause
-