Code Review
/
common
/
thrift.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(parent:
21c95a3
)
Don't allow async (no return) functions that throw exceptions.
author
David Reiss
<dreiss@apache.org>
Fri, 14 Mar 2008 00:51:42 +0000
(
00:51
+0000)
committer
David Reiss
<dreiss@apache.org>
Fri, 14 Mar 2008 00:51:42 +0000
(
00:51
+0000)
This wouldn't work anyway. Better to catch it early.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665570
13f79535
-47bb-0310-9956-
ffa450edef68
compiler/cpp/src/parse/t_function.h
patch
|
blob
|
history
diff --git
a/compiler/cpp/src/parse/t_function.h
b/compiler/cpp/src/parse/t_function.h
index
ed1c73c
..
74dac63
100644
(file)
--- a/
compiler/cpp/src/parse/t_function.h
+++ b/
compiler/cpp/src/parse/t_function.h
@@
-41,7
+41,12
@@
class t_function : public t_doc {
name_(name),
arglist_(arglist),
xceptions_(xceptions),
- async_(async) {}
+ async_(async)
+ {
+ if (async_ && !xceptions_->get_members().empty()) {
+ throw std::string("Async methods can't throw exceptions.");
+ }
+ }
~t_function() {}