Module jcifs

Class SmbException

All Implemented Interfaces:
Serializable, DosError, NtStatus, WinError
Direct Known Subclasses:
DfsReferral, SmbAuthException

public class SmbException extends IOException 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 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 recieve a different error from a legacy server than that of a newer varient 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:
  • Constructor Details

    • SmbException

      public SmbException(int errcode, boolean winerr)
      Constructs an SmbException with an error code.
      Parameters:
      errcode - the error code
      winerr - true if this is a Windows error code, false for DOS error code
  • Method Details

    • getNtStatus

      public int getNtStatus()
      Returns the NT status code for this exception.
      Returns:
      the NT status code
    • getRootCause

      public Throwable getRootCause()
      Returns the root cause of this exception if one exists
      Returns:
      the root cause throwable, or null if none exists
    • toString

      public String toString()
      Overrides:
      toString in class Throwable