SourcePro® API Reference Guide

 
Loading...
Searching...
No Matches
RWExternalStreamException Class Reference

Base class for the stream exceptions. More...

#include <rw/stream/RWExternalStreamException.h>

Inheritance diagram for RWExternalStreamException:
RWExternalErr RWxmsg RWIncompleteStreamOperation

Public Types

enum  ErrorCode {
  ok , flush , write , read ,
  get , internalOstream , internalIstream , featureNotSupported ,
  outOfMemory , invalidParameter , invalidUnicodeEncoding , invalidUTF8Encoding
}
 

Public Member Functions

 RWExternalStreamException ()
 
 RWExternalStreamException (const char *msg, ErrorCode err)
 
 RWExternalStreamException (const RWCString &msg, ErrorCode err)
 
 RWExternalStreamException (const RWExternalStreamException &x)
 
ErrorCode errorCode () const
 
- Public Member Functions inherited from RWxmsg
 RWxmsg (const char *msg)
 
 RWxmsg (const RWxmsg &msg)
 
 RWxmsg (RWxmsg &&msg)
 
RWxmsgoperator= (const RWxmsg &)
 
RWxmsgoperator= (RWxmsg &&msg)
 
virtual void raise () const
 
void swap (RWxmsg &rhs)
 
virtual const char * why () const
 

Additional Inherited Members

- Protected Member Functions inherited from RWxmsg
 RWxmsg (const char *msg, bool doCopy)
 

Detailed Description

Base class for all the stream exceptions.

Member Enumeration Documentation

◆ ErrorCode

ErrorCode is an enumeration that represents the error type for a stream exception.

Enumerator
ok 

ok = 0. Everything is fine.

flush 

Error while flushing the stream.

write 

Error while writing to the stream.

read 

Error while reading an RWByte, char, wchar_t, or RWUChar.

get 

Error while reading a data type.

internalOstream 

Internal std::ostream object is in fail or bad

internalIstream 

Internal std::istream object is in fail or bad

featureNotSupported 

Reports a feature not currently supported due to compiler limitation.

outOfMemory 

The last memory allocation request failed.

invalidParameter 

One of the parameters has been assigned an invalid value.

invalidUnicodeEncoding 

A sequence of RWUChar does not represent a valid sequence of UTF-16 characters.

invalidUTF8Encoding 

A sequence of bytes is not formatted according to UTF-8.

Constructor & Destructor Documentation

◆ RWExternalStreamException() [1/4]

RWExternalStreamException::RWExternalStreamException ( )

Constructs an empty stream exception.

◆ RWExternalStreamException() [2/4]

RWExternalStreamException::RWExternalStreamException ( const char * msg,
ErrorCode err )

Constructs a stream exception, and initializes it with the error message msg and the error code err.

Parameters
msgA message describing the error.
errThe error code associated with the error.

◆ RWExternalStreamException() [3/4]

RWExternalStreamException::RWExternalStreamException ( const RWCString & msg,
ErrorCode err )

Constructs a stream exception, and initializes it with the error message msg and the error code err.

Parameters
msgA message describing the error.
errThe error code associated with the error.

◆ RWExternalStreamException() [4/4]

RWExternalStreamException::RWExternalStreamException ( const RWExternalStreamException & x)

Copy constructor.

Parameters
xA stream exception used to initialize the newly created stream exception.

Member Function Documentation

◆ errorCode()

ErrorCode RWExternalStreamException::errorCode ( ) const

Returns the error code associated with a particular stream exception instance.

Copyright © 2024 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved.