diff options
Diffstat (limited to 'cpp')
-rw-r--r-- | cpp/src/Ice/Exception.cpp | 10 | ||||
-rw-r--r-- | cpp/src/slice2swift/Gen.cpp | 27 |
2 files changed, 20 insertions, 17 deletions
diff --git a/cpp/src/Ice/Exception.cpp b/cpp/src/Ice/Exception.cpp index 64c1f9c3703..72473771a72 100644 --- a/cpp/src/Ice/Exception.cpp +++ b/cpp/src/Ice/Exception.cpp @@ -707,7 +707,7 @@ void Ice::NoValueFactoryException::ice_print(ostream& out) const { Exception::ice_print(out); - out << ":\nprotocol error: no suitable object factory found for `" << type << "'"; + out << ":\nprotocol error: no suitable value factory found for `" << type << "'"; if(!reason.empty()) { out << ":\n" << reason; @@ -788,28 +788,28 @@ void Ice::NotRegisteredException::ice_print(ostream& out) const { Exception::ice_print(out); - out << ":\n no " << kindOfObject << " with id `" << id << "' is registered"; + out << ":\nno " << kindOfObject << " with id `" << id << "' is registered"; } void Ice::TwowayOnlyException::ice_print(ostream& out) const { Exception::ice_print(out); - out << ":\n operation `" << operation << "' can only be invoked as a twoway request"; + out << ":\noperation `" << operation << "' can only be invoked as a twoway request"; } void Ice::CloneNotImplementedException::ice_print(ostream& out) const { Exception::ice_print(out); - out << ":\n ice_clone() must be implemented in classes derived from abstract base classes"; + out << ":\nice_clone() must be implemented in classes derived from abstract base classes"; } void Ice::FeatureNotSupportedException::ice_print(ostream& out) const { Exception::ice_print(out); - out << ":\nfeature `" << unsupportedFeature << "' is not supported."; + out << ":\nfeature `" << unsupportedFeature << "' is not supported"; } void 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) { |