summaryrefslogtreecommitdiff
path: root/matlab/src/Util.cpp
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2018-03-20 11:32:55 -0700
committerMark Spruiell <mes@zeroc.com>2018-03-20 11:32:55 -0700
commit6b696300711cf12bbabfc50092acaa989def81e7 (patch)
treef4c189db702cdf0b1210dd1ae140dd70ed970014 /matlab/src/Util.cpp
parentFix JavaScript Uncaught CommunicatorDestroyed exception (diff)
downloadice-6b696300711cf12bbabfc50092acaa989def81e7.tar.bz2
ice-6b696300711cf12bbabfc50092acaa989def81e7.tar.xz
ice-6b696300711cf12bbabfc50092acaa989def81e7.zip
ICE-8753 - translate invalid_argument in MATLAB
Diffstat (limited to 'matlab/src/Util.cpp')
-rw-r--r--matlab/src/Util.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/matlab/src/Util.cpp b/matlab/src/Util.cpp
index 95ec7d61a8a..d38de11f710 100644
--- a/matlab/src/Util.cpp
+++ b/matlab/src/Util.cpp
@@ -505,6 +505,13 @@ IceMatlab::convertException(const std::exception& exc)
params[1] = createStringFromUTF8(msg);
mexCallMATLAB(1, &ex, idx, params, cls.c_str());
}
+ else if(dynamic_cast<const std::invalid_argument*>(&exc))
+ {
+ mxArray* params[2];
+ params[0] = createStringFromUTF8("Ice:InvalidArgumentException");
+ params[1] = createStringFromUTF8(exc.what());
+ mexCallMATLAB(1, &ex, 2, params, "MException");
+ }
else
{
mxArray* params[2];