Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraradermache2013-06-20 13:40:26 +0000
committeraradermache2013-06-20 13:40:26 +0000
commite20648a6f9bacdd16b588b670b58888e4d06c388 (patch)
tree5eab8043a02d6f142ffd53999f287ced1007d2cc /extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org
parent0127d3aaab981ecf722f8d0785f950829fa4ea29 (diff)
downloadorg.eclipse.papyrus-e20648a6f9bacdd16b588b670b58888e4d06c388.tar.gz
org.eclipse.papyrus-e20648a6f9bacdd16b588b670b58888e4d06c388.tar.xz
org.eclipse.papyrus-e20648a6f9bacdd16b588b670b58888e4d06c388.zip
Minor modifications
Diffstat (limited to 'extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org')
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/operation/CppOperations.mtl9
1 files changed, 8 insertions, 1 deletions
diff --git a/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/operation/CppOperations.mtl b/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/operation/CppOperations.mtl
index 81c80bce0db..7e48222a84c 100644
--- a/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/operation/CppOperations.mtl
+++ b/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/operation/CppOperations.mtl
@@ -62,6 +62,13 @@ endif/]
[/template]
+[template public throws(operation: Operation)]
+[if (operation.raisedException->size() > 0)]
+throws [for (raisedException) separator(',')][name/][/for]
+[/if]
+[/template]
+
+
[template public CppOperationImplementation(operation : Operation)]
[CppOperationDoc()/]
[if (operation.name = 'main')]
@@ -69,7 +76,7 @@ endif/]
[getBody('C/C++')/]
}
[else]
-[templateSignature()/][InlineTxt()/][CppReturnSpec()/][operation.class.name/][templateShortSignature()/]::[destructor()/][operation.name/]([CppOperationParameters(false)/])[modConst()/][CppConstInit()/] {
+[templateSignature()/][InlineTxt()/][CppReturnSpec()/][operation.class.name/][templateShortSignature()/]::[destructor()/][operation.name/]([CppOperationParameters(false)/])[throws()/][modConst()/][CppConstInit()/] {
[getBodyInTemplate('C/C++')/]
}
[/if]

Back to the top