summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/StreamI.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/Ice/StreamI.cpp')
-rw-r--r--cpp/src/Ice/StreamI.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/cpp/src/Ice/StreamI.cpp b/cpp/src/Ice/StreamI.cpp
index f992b99b76f..c0006b817c0 100644
--- a/cpp/src/Ice/StreamI.cpp
+++ b/cpp/src/Ice/StreamI.cpp
@@ -9,6 +9,7 @@
#include <Ice/StreamI.h>
#include <Ice/Initialize.h>
+#include <Ice/LocalException.h>
using namespace std;
using namespace Ice;
@@ -305,7 +306,7 @@ Ice::InputStreamI::startEncapsulation()
void
Ice::InputStreamI::endEncapsulation()
{
- _is->endReadEncaps();
+ _is->endReadEncapsChecked();
}
void
@@ -562,6 +563,11 @@ Ice::OutputStreamI::writeWstringSeq(const vector<wstring>& v)
void
Ice::OutputStreamI::writeSize(Int sz)
{
+ if(sz < 0)
+ {
+ throw NegativeSizeException(__FILE__, __LINE__);
+ }
+
_os->writeSize(sz);
}
@@ -610,7 +616,7 @@ Ice::OutputStreamI::startEncapsulation()
void
Ice::OutputStreamI::endEncapsulation()
{
- _os->endWriteEncaps();
+ _os->endWriteEncapsChecked();
}
void