Public Types | Public Member Functions | Static Public Member Functions

base::IOException Class Reference

Input/Output exception. More...

#include <libppbase/base/IOException.h>

Inheritance diagram for base::IOException:
base::Exception

List of all members.

Public Types

enum  {
  errDir = 1, errFile, errMutex, errSig,
  errSock, errSockNoSuchHost, errSockNoSuchService, errSockAcceptTimeout,
  errSockConnectTimeout, errSockReadTimeout, errSockWriteTimeout, errSys,
  errThread, errDNS, errIConv, errDL,
  errMMap, errEnv, errPipe, errShMem
}
 

i/o error codes

More...

Public Member Functions

 IOException (int errcode, int errn, const char *fmt=NULL,...)
 Constructor.
int getErrno () const
 Gets the operating system error number.
virtual String toString () const
 Gets a string representation of this exception.

Static Public Member Functions

static void allowErrorPopups (bool allow=true)
 Allows or inhibits the appearance of popup windows for I/O errors like "Unable to load DLL", "Insert Floppy / CDROM", etc. on the Windows platform.

Detailed Description

Input/Output exception.

Author:
Christoph Schwarz
Version:
$Id: IOException.h 21 2010-09-05 04:18:17Z cschwarz1 $

Member Enumeration Documentation

anonymous enum

i/o error codes

Enumerator:
errDir 

directory i/o error

errFile 

file i/o error

errMutex 

mutex error

errSig 

signal error

errSock 

socket i/o error

errSockNoSuchHost 

host does not exist

errSockNoSuchService 

service does not exist

errSockAcceptTimeout 

socket accept timeout

errSockConnectTimeout 

socket connect timeout

errSockReadTimeout 

socket read timeout

errSockWriteTimeout 

socket write timeout

errSys 

system error

errThread 

thread error

errDNS 

dns error

errIConv 

iconv error

errDL 

dynamic link error

errMMap 

memory mapping error

errEnv 

environment error

errPipe 

pipe error

errShMem 

shared memory error


Constructor & Destructor Documentation

base::IOException::IOException ( int  errcode,
int  errn,
const char *  fmt = NULL,
  ... 
)

Constructor.

Parameters:
errcode application-defined error code
errn operating system error number (pass global errno here)
fmt printf-like format string to take an additional error message
... additional arguments for the format string

Member Function Documentation

static void base::IOException::allowErrorPopups ( bool  allow = true  )  [static]

Allows or inhibits the appearance of popup windows for I/O errors like "Unable to load DLL", "Insert Floppy / CDROM", etc. on the Windows platform.

The default behavior on Windows is to show a popup window on such errors. This is highly unwanted for console and background applications.

Parameters:
allow true to allow popup windows, false to inhibit them
int base::IOException::getErrno (  )  const

Gets the operating system error number.

Returns:
the operating system error number (errno)
virtual String base::IOException::toString (  )  const [virtual]

Gets a string representation of this exception.

Returns:
string representation (for logging purposes)

Reimplemented from base::Exception.


The documentation for this class was generated from the following file: