GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  EXCEPTION (3)

NAME

FBB::Exception - std::exception objects acception stream insertions

CONTENTS

SYNOPSIS

#include <bobcat/exception>
Linking option: -lbobcat

DESCRIPTION

FBB::Exception objects derived from std::exception, but accept stream insertions. Their intended use consists of throwing an anonymous object, into which the text of the std::exception::what message has been inserted.

Exception exceptions are thrown by several Bobcat classes. These classes are Arg, ArgConfig, BigInt, Cgi, Cidr, ClientSocket, CmdFinderBase, ConfigFile, DateTime, DecryptBuf, DigestBuf, EncryptBuf, Fork, GetHostent, Glob, HMacBuf, Hostname, LocalClientSocket, LocalServerSocket, LocalSocketBase, Log, MailHeaders, Mbuf, Milter, Mstream, OFoldStreambuf, OneKey, Pattern, Pipe, Process, Redirector, Selector, ServerSocket, Signal, SocketBase, Stat, TempStream, User, Xpointer

NAMESPACE

FBB
All constructors, members, operators and manipulators, mentioned in this man-page, are defined in the namespace FBB.

INHERITS FROM

std::exception

ENUMERATION

The enumeration Protection is used by the member protection described below. The enumeration has two values:
o ANY: an existing file may have any set of protection bits;
o EQUAL: an existing file mut have exactly the set of protection bits as specified when calling Exception::protection.

CONSTRUCTORS

o Exception():
The default constructor
o Exception(int errnoValue):
This constructor stores the provided errnoValue value in the global ::errno variable, provided by the run-time support system. Move and copy constructors are available.

MEMBER FUNCTIONS

All members of std::exception are available, as FBB::Exception inherits from this class.
o char const *what() const noexcept(true) override:
Returns the text that was inserted into the FBB::Exception object.

OVERLOADED OPERATORS

o Exception &&operator<<(Exception &&in, Type const &t):
A function template implementing the overloaded insertion operator. It can be used to insert values of any type that can also be inserted into an ostringstream object. The overloaded assignment and move assignment operators are available.

STATIC MEMBERS

The following convenience functions can be used for controlled opening of stream-type objects, like std::ofstream and std::ifstream. These stream-type objects must support open and close members, like those provided by std::ifstream and std::ofstream.

If the stream was already open it is first closed.

If opening fails an FBB::Exception exception is thrown containing a short message stating that the named stream could not be opened.

o static void open(StreamType &stream, std::string const &name):
Opens the stream object, using its default open member.
o static void open(int errnoValue, StreamType &stream, std::string const &name):
Opens the stream object, using its default open member. If opening the stream fails, then the thrown FBB::Exception assigns errnoValue to ::errno.
o static void open(StreamType &stream, std::string const &name, std::ios::openmode mode):
Opens the stream object, using its open member, passing mode to open.
o static void open(int errnoValue, StreamType &stream, std::string const &name, std::ios::openmode mode):
Opens the stream object, using its open member, passing mode to open. If opening the stream fails, then the thrown FBB::Exception assigns errnoValue to ::errno.
o static size_t protection(std::string const &path, size_t protect, Protection type = EQUAL):
Returns the protection bits (cf. open(2)) of path. The protect parameter is used to specify the requested protection bits. This value is usually specified as an octal value. If the specified value exceeds 0777 an exception is thrown. The third parameter is only used in combination with already existing files. If specified as ANY the file\(cqs actual permission bits are not compared with protect; if specified as EQUAL the file\(cqs permission bits must be identical to protect, or an exception is thrown. If path does not yet exist a file path with permission protect is created. This member returns path\(cqs permission bits.
If path is created by protection, then opening a stream for path does not change path\(cqs protection.

MANIPULATOR

The following manipulator (which is not part of the FBB::Exception, class, but is defined in the FBB namespace) can be inserted into the FBB::Exception object:
o FBB::errnodescr:
The descriptive text associated with the current errno value is inserted into the FBB::Exception object (it can also be used to insert the descriptive text in a std::ostream object). No text is inserted if errno equals zero. This manipulator is thread-safe (but errno may be modified when errno holds an invalid value).

EXAMPLE

if (exceptionalCondition) throw FBB::Exception(1) << \(dqExceptional condition occurred\(dq;

FILES

bobcat/exception - defines the class interface

SEE ALSO

bobcat(7)

BUGS

None Reported.

DISTRIBUTION FILES

o bobcat_3.25.01-x.dsc: detached signature;
o bobcat_3.25.01-x.tar.gz: source archive;
o bobcat_3.25.01-x_i386.changes: change log;
o libbobcat1_3.25.01-x_*.deb: debian package holding the libraries;
o libbobcat1-dev_3.25.01-x_*.deb: debian package holding the libraries, headers and manual pages;
o http://sourceforge.net/projects/bobcat: public archive location;

BOBCAT

Bobcat is an acronym of ‘Brokken\(cqs Own Base Classes And Templates\(cq.

COPYRIGHT

This is free software, distributed under the terms of the GNU General Public License (GPL).

AUTHOR

Frank B. Brokken (f.b.brokken@rug.nl).

Search for    or go to Top of page |  Section 3 |  Main Index


libbobcat-dev_3&.25&.01-x&.tar&.gz FBB::EXCEPTION (3bobcat) 2005-2015

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.