#include <config.h< #include <histotypes.h< #include <CPortManagerException.h<
class CPortManagerException {CPortManagerException(std::string host, Reason why, std::string doing);
virtual const const char* ReasonText();
virtual const Int_t ReasonCode();
static string ReasonCodeToText(int code);
}
CPortManagerException
is an exception that can be thrown by the port manager
class CPortManager
see the man page for that class).
Since it is derived
from
CException
,
it can be caught as a generic error. In addition to the base
class members, the class supports insertion into an output stream.
CPortManagerException(std::string host, Reason why, std::string doing);
Constructs the exception. host
is the host that
the object was connected to, or attempted to connect to when the
error was detected. why
Is the reason for
the exception. See "Types and public data" below for more information
about the possible values the Reason type can take.
doing
provides context information that describes
what the object was attempting to do when the error was detected.
virtual const const char* ReasonText();
Returns comprehensive human readable text that describes the reason this operation failed.
virtual const Int_t ReasonCode();
Returns the reason code. The reason code is just the Reason cast to an integer.
static string ReasonCodeToText(int code);
Converts a reason code into a text string that describes the reason.
Formats the exception object e
and writes it to the
output stream f
. A reference to the output stream
is returned allowing the normal sorts of cascading of the
operator<<
function.
Reason is an enumerated type that describes the actual error condition that was detected:
When attempting to allocate a service port, thee daemon reported that all available service ports in the block it is managing are in use.
You are attempting to allocate a port on a remote system. Service ports can only be allocated by programs running on the same system as the port manager daemon.
An attempt to connect to the daemon failed.