diff options
author | Michi Henning <michi@zeroc.com> | 2003-06-04 07:47:51 +0000 |
---|---|---|
committer | Michi Henning <michi@zeroc.com> | 2003-06-04 07:47:51 +0000 |
commit | 1eb658e1f0b7a267ed44e2c5dd65db2cc933ca26 (patch) | |
tree | a4fc4782d77aa48536b720b30688debe04e072fa /cpp/src/Slice/Parser.cpp | |
parent | RH9 notes (diff) | |
download | ice-1eb658e1f0b7a267ed44e2c5dd65db2cc933ca26.tar.bz2 ice-1eb658e1f0b7a267ed44e2c5dd65db2cc933ca26.tar.xz ice-1eb658e1f0b7a267ed44e2c5dd65db2cc933ca26.zip |
- Added a test to the Slice parser to complain if an operation on a local
interface or class has an exception specification.
- Added a test to the property parsing code to print a warning on stderr if
a property is not recognized. This prevents silly typos, such as
"Ice.config=MyFile" (instead of "Ice.Config=MyFile") from slipping
through undetected.
Diffstat (limited to 'cpp/src/Slice/Parser.cpp')
-rw-r--r-- | cpp/src/Slice/Parser.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/cpp/src/Slice/Parser.cpp b/cpp/src/Slice/Parser.cpp index b546bd10445..afb68d357ae 100644 --- a/cpp/src/Slice/Parser.cpp +++ b/cpp/src/Slice/Parser.cpp @@ -3620,6 +3620,21 @@ Slice::Operation::setExceptionList(const ExceptionList& el) _throws = el; // + // Local interfaces and classes cannot have an exception specification. + // + if(el.size() != 0) { + ClassDefPtr parent = ClassDefPtr::dynamicCast(container()); + assert(parent); + if(parent->isLocal()) + { + string msg = "operation `" + name() + "' cannot have a throws clause because it is an operation on a "; + msg += parent->kindOf(); + _unit->error(msg); + return; + } + } + + // // Check that no exception occurs more than once in the throws clause // ExceptionList uniqueExceptions = el; |