NIOException Class Reference

NIOException is the exception object thrown in I/O related errors. More...

Inheritance diagram for NIOException:

NException

List of all members.

Public Types

enum  Resource { UNKNOWN, FILE, DIRECTORY }
 Enumerates the set of resources in which a problem will throw a NIOException exception. More...

Public Member Functions

 NIOException (const NString &desc, const NString &name, Module module, Resource resource, Flag flag)
 Constructs a NIOException object.
Resource getResource (void) const
 Gets the resource associated with the exception.
NString getResourceName (void) const
 Gets the name of the resource associated with the exception.

Static Public Member Functions

static Flag getFlagByErr (nuint32 errno_val)
 Given a errno value, this function will return a corresponding flag value (as defined by the enum Flag).

Static Public Attributes

static const Flag IO_NOT_FOUND = 1
static const Flag IO_ACCESS_DENIED = 2
static const Flag IO_SYSTEM = 3
static const Flag IO_NO_SPACE = 4
static const Flag IO_IO_ERROR = 5


Detailed Description

NIOException is the exception object thrown in I/O related errors.
Examples:

ex_nfile.cpp.

Definition at line 37 of file nioexception.h.


Member Enumeration Documentation

enum Resource

Enumerates the set of resources in which a problem will throw a NIOException exception.

Enumerator:
UNKNOWN  Unknown or unset resource
FILE  File resource
DIRECTORY  Directory resource

Definition at line 43 of file nioexception.h.


Constructor & Destructor Documentation

NIOException ( const NString desc,
const NString name,
Module  module,
Resource  resource,
Flag  flag 
)

Constructs a NIOException object.

Parameters:
desc Exception description
name The name of the resource
module The module in which the exception occurred
resource The resource that caused the exception
flag A set of flags that may identify what occurred

Definition at line 32 of file nioexception.cpp.


Member Function Documentation

NIOException::Resource getResource ( void   )  const

Gets the resource associated with the exception.

Returns:
A resource value as enumerated by the enum Resource.
Examples:
ex_nfile.cpp.

Definition at line 42 of file nioexception.cpp.

NString getResourceName ( void   )  const

Gets the name of the resource associated with the exception.

Returns:
The name of the resource
Examples:
ex_nfile.cpp.

Definition at line 47 of file nioexception.cpp.

Flag getFlagByErr ( nuint32  errno_val  )  [static]

Given a errno value, this function will return a corresponding flag value (as defined by the enum Flag).

Parameters:
errno_val The value of the errno variable
Returns:
A flag value corresponding to the given errno value

Definition at line 51 of file nioexception.cpp.

References IO_ACCESS_DENIED, IO_IO_ERROR, IO_NO_SPACE, IO_NOT_FOUND, and IO_SYSTEM.

Referenced by NFile::open().


Member Data Documentation

DllDeclSpec const Flag IO_NOT_FOUND = 1 [static]

Resource not found

Definition at line 50 of file nioexception.h.

Referenced by getFlagByErr().

DllDeclSpec const Flag IO_ACCESS_DENIED = 2 [static]

Access to the resource was denied

Examples:
ex_nfile.cpp.

Definition at line 51 of file nioexception.h.

Referenced by getFlagByErr().

DllDeclSpec const Flag IO_SYSTEM = 3 [static]

Low-level system error

Definition at line 52 of file nioexception.h.

Referenced by getFlagByErr().

DllDeclSpec const Flag IO_NO_SPACE = 4 [static]

No space available on the device

Definition at line 53 of file nioexception.h.

Referenced by getFlagByErr().

DllDeclSpec const Flag IO_IO_ERROR = 5 [static]

Input/output error

Definition at line 54 of file nioexception.h.

Referenced by getFlagByErr().


The documentation for this class was generated from the following files:
Generated on Wed Mar 5 23:10:36 2008 for NemesisUtilitiesSystem by  doxygen 1.5.4