summaryrefslogtreecommitdiff
path: root/cppe/src/IceE/BasicStream.cpp
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2007-04-30 15:41:10 +0000
committerBenoit Foucher <benoit@zeroc.com>2007-04-30 15:41:10 +0000
commite9f9e7ad594e3a2a366547617d5e829e99aa3752 (patch)
treea09e1cb4c6ed18e9f45721be8e582173a9bea573 /cppe/src/IceE/BasicStream.cpp
parentREmove VC6 and VC7 (diff)
downloadice-e9f9e7ad594e3a2a366547617d5e829e99aa3752.tar.bz2
ice-e9f9e7ad594e3a2a366547617d5e829e99aa3752.tar.xz
ice-e9f9e7ad594e3a2a366547617d5e829e99aa3752.zip
Bug #2155
Diffstat (limited to 'cppe/src/IceE/BasicStream.cpp')
-rw-r--r--cppe/src/IceE/BasicStream.cpp53
1 files changed, 12 insertions, 41 deletions
diff --git a/cppe/src/IceE/BasicStream.cpp b/cppe/src/IceE/BasicStream.cpp
index 56e77dddcdf..27cb890addb 100644
--- a/cppe/src/IceE/BasicStream.cpp
+++ b/cppe/src/IceE/BasicStream.cpp
@@ -170,7 +170,7 @@ IceInternal::BasicStream::startSeq(int numElements, int minSize)
//
if(numElements * minSize > bytesLeft)
{
- throw UnmarshalOutOfBoundsException(__FILE__, __LINE__);
+ throwUnmarshalOutOfBoundsException(__FILE__, __LINE__);
}
}
else // Nested sequence
@@ -190,7 +190,7 @@ IceInternal::BasicStream::checkFixedSeq(int numElements, int elemSize)
//
if(numElements * elemSize > bytesLeft)
{
- throw UnmarshalOutOfBoundsException(__FILE__, __LINE__);
+ throwUnmarshalOutOfBoundsException(__FILE__, __LINE__);
}
}
else // Nested sequence
@@ -251,11 +251,11 @@ IceInternal::BasicStream::skipEncaps()
read(sz);
if(sz < 0)
{
- throw NegativeSizeException(__FILE__, __LINE__);
+ throwNegativeSizeException(__FILE__, __LINE__);
}
if(i - sizeof(Int) + sz > b.end())
{
- throw UnmarshalOutOfBoundsException(__FILE__, __LINE__);
+ throwUnmarshalOutOfBoundsException(__FILE__, __LINE__);
}
i += sz - sizeof(Int);
}
@@ -294,7 +294,7 @@ IceInternal::BasicStream::startReadSlice()
read(sz);
if(sz < 0)
{
- throw NegativeSizeException(__FILE__, __LINE__);
+ throwNegativeSizeException(__FILE__, __LINE__);
}
_readSlice = i - b.begin();
}
@@ -311,12 +311,12 @@ IceInternal::BasicStream::skipSlice()
read(sz);
if(sz < 0)
{
- throw NegativeSizeException(__FILE__, __LINE__);
+ throwNegativeSizeException(__FILE__, __LINE__);
}
i += sz - sizeof(Int);
if(i > b.end())
{
- throw UnmarshalOutOfBoundsException(__FILE__, __LINE__);
+ throwUnmarshalOutOfBoundsException(__FILE__, __LINE__);
}
}
@@ -338,7 +338,7 @@ IceInternal::BasicStream::readBlob(vector<Byte>& v, Int sz)
{
if(b.end() - i < sz)
{
- throw UnmarshalOutOfBoundsException(__FILE__, __LINE__);
+ throwUnmarshalOutOfBoundsException(__FILE__, __LINE__);
}
vector<Byte>(i, i + sz).swap(v);
i += sz;
@@ -524,7 +524,7 @@ IceInternal::BasicStream::read(Short& v)
{
if(b.end() - i < static_cast<int>(sizeof(Short)))
{
- throw UnmarshalOutOfBoundsException(__FILE__, __LINE__);
+ throwUnmarshalOutOfBoundsException(__FILE__, __LINE__);
}
const Byte* src = &(*i);
i += sizeof(Short);
@@ -769,7 +769,7 @@ IceInternal::BasicStream::read(Long& v)
{
if(b.end() - i < static_cast<int>(sizeof(Long)))
{
- throw UnmarshalOutOfBoundsException(__FILE__, __LINE__);
+ throwUnmarshalOutOfBoundsException(__FILE__, __LINE__);
}
const Byte* src = &(*i);
i += sizeof(Long);
@@ -935,7 +935,7 @@ IceInternal::BasicStream::read(Float& v)
{
if(b.end() - i < static_cast<int>(sizeof(Float)))
{
- throw UnmarshalOutOfBoundsException(__FILE__, __LINE__);
+ throwUnmarshalOutOfBoundsException(__FILE__, __LINE__);
}
const Byte* src = &(*i);
i += sizeof(Float);
@@ -1100,7 +1100,7 @@ IceInternal::BasicStream::read(Double& v)
{
if(b.end() - i < static_cast<int>(sizeof(Double)))
{
- throw UnmarshalOutOfBoundsException(__FILE__, __LINE__);
+ throwUnmarshalOutOfBoundsException(__FILE__, __LINE__);
}
const Byte* src = &(*i);
i += sizeof(Double);
@@ -1438,35 +1438,6 @@ IceInternal::BasicStream::throwException()
//
}
-void
-IceInternal::BasicStream::throwUnmarshalOutOfBoundsException(const char* file, int line)
-{
- throw UnmarshalOutOfBoundsException(file, line);
-}
-
-void
-IceInternal::BasicStream::throwMemoryLimitException(const char* file, int line)
-{
- throw MemoryLimitException(file, line);
-}
-
-void
-IceInternal::BasicStream::throwNegativeSizeException(const char* file, int line)
-{
- throw NegativeSizeException(file, line);
-}
-
-void
-IceInternal::BasicStream::throwUnsupportedEncodingException(const char* file, int line, Byte eMajor, Byte eMinor)
-{
- UnsupportedEncodingException ex(file, line);
- ex.badMajor = static_cast<unsigned char>(eMajor);
- ex.badMinor = static_cast<unsigned char>(eMinor);
- ex.major = static_cast<unsigned char>(encodingMajor);
- ex.minor = static_cast<unsigned char>(encodingMinor);
- throw ex;
-}
-
IceInternal::BasicStream::SeqData::SeqData(int num, int sz) : numElements(num), minSize(sz)
{
}