<?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 Re: Exception Handling in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/exception-handling/m-p/869997#M49679</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Serdar.. thank you very much...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 04 Apr 2005 19:41:22 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2005-04-04T19:41:22Z</dc:date>
    <item>
      <title>Exception Handling</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exception-handling/m-p/869995#M49677</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Right now i'm studying the eLearning Material located at the ABAP Section (for more info: &lt;A href="https://www.sdn.sap.com/sdn/developerareas/abap.sdn?node=linkDnode6-3)" target="test_blank"&gt;https://www.sdn.sap.com/sdn/developerareas/abap.sdn?node=linkDnode6-3)&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I got a doubt reading this stuff. How i can use the methods of the Exception GET_TEXT and GET_SOURCE_POSITION that belongs to the exeption's class?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;  TRY.
     Z = 1 / 0. "ZERO DIVISION    
 
    CATCH cx_root INTO ex.


  ENDTRY.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where CX_ROOT has 2 methods of it own: 1) GET_TEXT, 2) GET_SOURCE_POSITION &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any idea?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Apr 2005 18:15:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exception-handling/m-p/869995#M49677</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-04-04T18:15:12Z</dc:date>
    </item>
    <item>
      <title>Re: Exception Handling</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exception-handling/m-p/869996#M49678</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Carlos&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Inspect this standard example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
...
parameters NUMBER type I.

data RESULT type P decimals 2.
data OREF type ref to CX_ROOT.
data TEXT type STRING.

start-of-selection.

  write: / 'Testing division and Sqare root with', NUMBER.
  uline.

    try.
    if ABS( NUMBER ) &amp;gt; 100.
      raise exception type CX_DEMO_ABS_TOO_LARGE.
    endif.
    try.
      RESULT =  1 / NUMBER.
      write: / 'Result of division:', RESULT.
      RESULT = SQRT( NUMBER ).
      write: / 'Result of square root:', RESULT.
      catch CX_SY_ZERODIVIDE into OREF.
      TEXT = OREF-&amp;gt;GET_TEXT( ).
      cleanup.
        clear RESULT.
    endtry.
    catch CX_SY_ARITHMETIC_ERROR into OREF.
      TEXT = OREF-&amp;gt;GET_TEXT( ).
    catch CX_ROOT into OREF.
      TEXT = OREF-&amp;gt;GET_TEXT( ).
    endtry.
    if not TEXT is initial.
      write / TEXT.
    endif.
    write: / 'Final result:', RESULT.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--Serdar &amp;lt;a href="https://www.sdn.sap.com:443http://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.sdn.businesscard.sdnbusinesscard?u=qbk%2bsag%2bjiw%3d"&amp;gt;[ BC ]&amp;lt;/a&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Apr 2005 19:26:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exception-handling/m-p/869996#M49678</guid>
      <dc:creator>ssimsekler</dc:creator>
      <dc:date>2005-04-04T19:26:17Z</dc:date>
    </item>
    <item>
      <title>Re: Exception Handling</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exception-handling/m-p/869997#M49679</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Serdar.. thank you very much...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Apr 2005 19:41:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exception-handling/m-p/869997#M49679</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-04-04T19:41:22Z</dc:date>
    </item>
  </channel>
</rss>

