From 38be7d804aa9fd784896b492f20017a5b292ee0d Mon Sep 17 00:00:00 2001 From: Michi Henning Date: Thu, 15 Nov 2007 12:34:24 +1000 Subject: Fixed bug in TestUtil.py that caused line numbers to be omitted from the stack trace under Mono when the a test failed. Ported servant locator exceptions. Fixed bug that caused the "unknown" member of unknown exception to not be initialized in some cases, and initialized to the wrong value in other cases. Added ice_name() to mapping for exceptions--without it, there was no way to get at the Slice type id of an exception, which was needed to set the "unknown" member correctly. --- cpp/src/Slice/CsUtil.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'cpp/src/Slice/CsUtil.cpp') diff --git a/cpp/src/Slice/CsUtil.cpp b/cpp/src/Slice/CsUtil.cpp index 2e392648a50..364f8f3e9aa 100755 --- a/cpp/src/Slice/CsUtil.cpp +++ b/cpp/src/Slice/CsUtil.cpp @@ -1540,6 +1540,17 @@ Slice::CsGenerator::MetaDataVisitor::visitStructEnd(const StructPtr&) void Slice::CsGenerator::MetaDataVisitor::visitOperation(const OperationPtr& p) { + if(p->hasMetaData("UserException")) + { + ClassDefPtr cl = ClassDefPtr::dynamicCast(p->container()); + if(!cl->isLocal()) + { + cout << p->definitionContext()->filename() << ":" << p->line() + << ": warning: metdata directive `UserException' applies only to local operations " + << "but enclosing " << (cl->isInterface() ? "interface" : "class") << "`" << cl->name() + << "' is not local" << endl; + } + } validate(p); } -- cgit v1.2.3