diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2009-04-21 11:03:19 -0230 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2009-04-21 11:03:19 -0230 |
commit | d6bbb689749d7eb25728feb2426fe4d9bcaaee69 (patch) | |
tree | df16c64ea4c2f728b435982660deea43f0252433 /cpp/src/Ice/Exception.cpp | |
parent | Bug 3957 - ensure python that starts scripts is same as one it uses internally (diff) | |
download | ice-d6bbb689749d7eb25728feb2426fe4d9bcaaee69.tar.bz2 ice-d6bbb689749d7eb25728feb2426fe4d9bcaaee69.tar.xz ice-d6bbb689749d7eb25728feb2426fe4d9bcaaee69.zip |
Bug 2798 - add reason information to MemoryLimitException
Diffstat (limited to 'cpp/src/Ice/Exception.cpp')
-rw-r--r-- | cpp/src/Ice/Exception.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/cpp/src/Ice/Exception.cpp b/cpp/src/Ice/Exception.cpp index 01778f4d7f9..35a14621375 100644 --- a/cpp/src/Ice/Exception.cpp +++ b/cpp/src/Ice/Exception.cpp @@ -32,6 +32,14 @@ throwUOE(const string& expectedType, const string& actualType) actualType, expectedType); } +void +throwMemoryLimitException(const char* file, int line, size_t requested, size_t maximum) +{ + ostringstream s; + s << "requested " << requested << " bytes, maximum allowed is " << maximum << " bytes (see Ice.MessageSizeMax)"; + throw Ice::MemoryLimitException(file, line, s.str()); +} + } } |