summaryrefslogtreecommitdiff
path: root/cpp/src/slice2cpp/Gen.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/slice2cpp/Gen.cpp')
-rw-r--r--cpp/src/slice2cpp/Gen.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp
index 77ff61ece97..c2d74616206 100644
--- a/cpp/src/slice2cpp/Gen.cpp
+++ b/cpp/src/slice2cpp/Gen.cpp
@@ -8342,8 +8342,17 @@ Slice::Gen::Cpp11StreamVisitor::visitModuleEnd(const ModulePtr& m)
}
bool
-Slice::Gen::Cpp11StreamVisitor::visitExceptionStart(const ExceptionPtr&)
+Slice::Gen::Cpp11StreamVisitor::visitExceptionStart(const ExceptionPtr& p)
{
+ if(!p->isLocal())
+ {
+ string scoped = p->scoped();
+ H << nl << "template<>";
+ H << nl << "struct StreamableTraits< " << fixKwd(scoped) << ">";
+ H << sb;
+ H << nl << "static const StreamHelperCategory helper = StreamHelperCategoryUserException;";
+ H << eb << ";" << nl;
+ }
return false;
}