summaryrefslogtreecommitdiff
path: root/cpp/src/slice2swift/Gen.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/slice2swift/Gen.cpp')
-rw-r--r--cpp/src/slice2swift/Gen.cpp27
1 files changed, 15 insertions, 12 deletions
diff --git a/cpp/src/slice2swift/Gen.cpp b/cpp/src/slice2swift/Gen.cpp
index 075a8ec5458..64f36904da5 100644
--- a/cpp/src/slice2swift/Gen.cpp
+++ b/cpp/src/slice2swift/Gen.cpp
@@ -391,7 +391,21 @@ Gen::TypesVisitor::visitExceptionStart(const ExceptionPtr& p)
}
writeMemberwiseInitializer(out, members, baseMembers, allMembers, p, rootClass, extraParams);
- if(!p->isLocal())
+ out << sp;
+ out << nl << "open override class func ice_staticId() -> Swift.String";
+ out << sb;
+ out << nl << "return \"" << p->scoped() << "\"";
+ out << eb;
+
+ if(p->isLocal())
+ {
+ out << sp;
+ out << nl << "open override func ice_print() -> String";
+ out << sb;
+ out << nl << "return _" << name << "Description";
+ out << eb;
+ }
+ else
{
out << sp;
out << nl << "override open func _iceWriteImpl(to ostr: "
@@ -433,17 +447,6 @@ Gen::TypesVisitor::visitExceptionStart(const ExceptionPtr& p)
out << nl << "return true";
out << eb;
}
- out << sp;
- out << nl << "override open func ice_id() -> Swift.String";
- out << sb;
- out << nl << "return \"" << p->scoped() << "\"";
- out << eb;
-
- out << sp;
- out << nl << "override open class func ice_staticId() -> Swift.String";
- out << sb;
- out << nl << "return \"" << p->scoped() << "\"";
- out << eb;
if(preserved && !basePreserved)
{