diff options
author | Michi Henning <michi@zeroc.com> | 2007-11-05 23:43:07 +1000 |
---|---|---|
committer | Michi Henning <michi@zeroc.com> | 2007-11-05 23:43:07 +1000 |
commit | a2a5af41c5274fa7e254558841c1367d07a445d4 (patch) | |
tree | a7ede915600cc8dcb0df48c535bd602ec225e95c /cpp/src/Slice/JavaUtil.cpp | |
parent | Fixed bug I introduced with the sequence mapping changes that caused (diff) | |
download | ice-a2a5af41c5274fa7e254558841c1367d07a445d4.tar.bz2 ice-a2a5af41c5274fa7e254558841c1367d07a445d4.tar.xz ice-a2a5af41c5274fa7e254558841c1367d07a445d4.zip |
Bug 2522 for C++ and Java.
Diffstat (limited to 'cpp/src/Slice/JavaUtil.cpp')
-rw-r--r-- | cpp/src/Slice/JavaUtil.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/cpp/src/Slice/JavaUtil.cpp b/cpp/src/Slice/JavaUtil.cpp index 8f27fb78708..a116b1a7a95 100644 --- a/cpp/src/Slice/JavaUtil.cpp +++ b/cpp/src/Slice/JavaUtil.cpp @@ -3442,6 +3442,17 @@ Slice::JavaGenerator::MetaDataVisitor::visitStructStart(const StructPtr& p) void Slice::JavaGenerator::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: metadata directive `UserException' applies only to local operations " + << "but enclosing " << (cl->isInterface() ? "interface" : "class") << "`" << cl->name() + << "' is not local" << endl; + } + } StringList metaData = getMetaData(p); TypePtr returnType = p->returnType(); if(!metaData.empty()) |