Index: /trunk/src/VBox/Main/idl/apiwrap-server.xsl
===================================================================
--- /trunk/src/VBox/Main/idl/apiwrap-server.xsl	(revision 55960)
+++ /trunk/src/VBox/Main/idl/apiwrap-server.xsl	(revision 55961)
@@ -1237,5 +1237,4 @@
     </xsl:if>
     <xsl:text>
-
         </xsl:text>
     <xsl:choose>
@@ -1248,9 +1247,9 @@
     </xsl:choose>
     <xsl:text> autoCaller(this);
-        if (FAILED(autoCaller.rc()))
-            throw autoCaller.rc();
-
-</xsl:text>
-    <xsl:value-of select="concat('        hrc = get', $attrbasename, '(')"/>
+        hrc = autoCaller.rc();
+        if (SUCCEEDED(hrc))
+        {
+</xsl:text>
+    <xsl:value-of select="concat('            hrc = get', $attrbasename, '(')"/>
     <xsl:variable name="passAutoCaller">
         <xsl:call-template name="checkoption">
@@ -1266,5 +1265,5 @@
     </xsl:apply-templates>
     <xsl:text>);
-</xsl:text>
+        }</xsl:text>
     <xsl:if test="$attrbasename != 'MidlDoesNotLikeEmptyInterfaces'">
         <xsl:text>
@@ -1277,6 +1276,5 @@
         </xsl:call-template>
         <xsl:text>);
-#endif
-</xsl:text>
+#endif</xsl:text>
     </xsl:if>
     <xsl:text>
@@ -1293,6 +1291,5 @@
     <xsl:call-template name="emitDTraceParamValNoTmp-DirNotIn"/>
     <xsl:text>);
-#endif
-</xsl:text>
+#endif</xsl:text>
     </xsl:if>
     <xsl:text>
@@ -1309,6 +1306,5 @@
     <xsl:call-template name="emitDTraceParamValNoTmp-DirNotIn"/>
     <xsl:text>);
-#endif
-</xsl:text>
+#endif</xsl:text>
     </xsl:if>
     <xsl:text>
@@ -1381,5 +1377,4 @@
         <xsl:text>);
 #endif
-
         </xsl:text>
         <xsl:choose>
@@ -1392,9 +1387,9 @@
         </xsl:choose>
         <xsl:text> autoCaller(this);
-        if (FAILED(autoCaller.rc()))
-            throw autoCaller.rc();
-
-</xsl:text>
-        <xsl:value-of select="concat('        hrc = set', $attrbasename, '(')"/>
+        hrc = autoCaller.rc();
+        if (SUCCEEDED(hrc))
+        {
+</xsl:text>
+        <xsl:value-of select="concat('            hrc = set', $attrbasename, '(')"/>
         <xsl:if test="$passAutoCaller = 'true'">
             <xsl:text>autoCaller, </xsl:text>
@@ -1404,5 +1399,5 @@
         </xsl:apply-templates>
         <xsl:text>);
-
+        }
 #ifdef VBOX_WITH_DTRACE_R3_MAIN
         </xsl:text>
@@ -1804,4 +1799,5 @@
     </xsl:for-each>
     <xsl:text>
+
 #ifdef VBOX_WITH_DTRACE_R3_MAIN
         </xsl:text>
@@ -1816,5 +1812,4 @@
     <xsl:text>);
 #endif
-
         </xsl:text>
     <xsl:choose>
@@ -1827,9 +1822,9 @@
     </xsl:choose>
     <xsl:text> autoCaller(this);
-        if (FAILED(autoCaller.rc()))
-            throw autoCaller.rc();
-
-</xsl:text>
-    <xsl:value-of select="concat('        hrc = ', @name, '(')"/>
+        hrc = autoCaller.rc();
+        if (SUCCEEDED(hrc))
+        {
+</xsl:text>
+    <xsl:value-of select="concat('            hrc = ', @name, '(')"/>
     <xsl:variable name="passAutoCaller">
         <xsl:call-template name="checkoption">
@@ -1852,10 +1847,10 @@
         <xsl:if test="not(position()=last())">
             <xsl:text>,
-               </xsl:text>
+                   </xsl:text>
             <xsl:value-of select="$methodindent"/>
         </xsl:if>
     </xsl:for-each>
     <xsl:text>);
-
+        }
 #ifdef VBOX_WITH_DTRACE_R3_MAIN
         </xsl:text>
