<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Difference between CATCH system-exceptions and try catch endtry in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-catch-system-exceptions-and-try-catch-endtry/m-p/4533090#M1071238</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone of you tell me why try catch endtry is a preferred way than catch system-exceptions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Aruna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 25 Sep 2008 12:00:04 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-09-25T12:00:04Z</dc:date>
    <item>
      <title>Difference between CATCH system-exceptions and try catch endtry</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-catch-system-exceptions-and-try-catch-endtry/m-p/4533090#M1071238</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone of you tell me why try catch endtry is a preferred way than catch system-exceptions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Aruna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Sep 2008 12:00:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-catch-system-exceptions-and-try-catch-endtry/m-p/4533090#M1071238</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-25T12:00:04Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between CATCH system-exceptions and try catch endtry</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-catch-system-exceptions-and-try-catch-endtry/m-p/4533091#M1071239</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This message was moderated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Sep 2008 12:05:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-catch-system-exceptions-and-try-catch-endtry/m-p/4533091#M1071239</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-25T12:05:52Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between CATCH system-exceptions and try catch endtry</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-catch-system-exceptions-and-try-catch-endtry/m-p/4533092#M1071240</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Aruna&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One major disadvantage of CATCH SYSTEM-EXCEPTIONS is that exception can be captured only &lt;STRONG&gt;locally&lt;/STRONG&gt; meaning just around the piece of coding which is framed by CATCH - ENDCATCH.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In contrast, using TRY - ENDTRY (i.e. class-based exceptions) you can &lt;STRONG&gt;propagate&lt;/STRONG&gt; the exception through a chain of callers due to the fact that you either &lt;STRONG&gt;"THROW or CATCH"&lt;/STRONG&gt; the exception.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example: You may have hierarchy of caller where at the deepest level an exception may occurs but you want to handle this exception at the first hierarchy level&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;CALL method_level_1&lt;/P&gt;&lt;/LI&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;CALL method_level_2&lt;/P&gt;&lt;/LI&gt;&lt;UL&gt;&lt;LI level="3" type="ul"&gt;&lt;P&gt;CALL method_level_3&lt;/P&gt;&lt;/LI&gt;&lt;UL&gt;&lt;LI level="4" type="ul"&gt;&lt;P&gt;CALL method_level_4 (exception can occur here)&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now you can do the following:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;TRY.&lt;/CODE&gt;&lt;/PRE&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;CALL method_level_1&lt;/P&gt;&lt;/LI&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;CALL method_level_2&lt;/P&gt;&lt;/LI&gt;&lt;UL&gt;&lt;LI level="3" type="ul"&gt;&lt;P&gt;CALL method_level_3&lt;/P&gt;&lt;/LI&gt;&lt;UL&gt;&lt;LI level="4" type="ul"&gt;&lt;P&gt;CALL method_level_4 (exception can occur here)&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CATCH cx_sy_arithmetic_error INTO lo_error.  " lo_error is of TYPE REF TO &amp;lt;exception class&amp;gt;
ENDTRY.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If all four methods the exception class defined in their signature and method_level_4 does not catch the exception it will be propagated to the top calling program which facilitates exception handling.&lt;/P&gt;&lt;P&gt;This you cannot achieve using CATCH - ENDCATCH.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;  Uwe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Sep 2008 18:42:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-catch-system-exceptions-and-try-catch-endtry/m-p/4533092#M1071240</guid>
      <dc:creator>uwe_schieferstein</dc:creator>
      <dc:date>2008-09-25T18:42:34Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between CATCH system-exceptions and try catch endtry</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-catch-system-exceptions-and-try-catch-endtry/m-p/4533093#M1071241</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please check this thread&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="2288302"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this would help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck&lt;/P&gt;&lt;P&gt;Narin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Sep 2008 07:33:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-catch-system-exceptions-and-try-catch-endtry/m-p/4533093#M1071241</guid>
      <dc:creator>narin_nandivada3</dc:creator>
      <dc:date>2008-09-26T07:33:14Z</dc:date>
    </item>
  </channel>
</rss>

