<?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 Catching an exception when calling a method in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/catching-an-exception-when-calling-a-method/m-p/7241092#M1526347</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My program has the following code in it:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

  TRY.
      lv_request = me-&amp;gt;get_request( ).
    CATCH cx_sy_ref_is_initial  INTO lv_error.

  ENDTRY.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I run the code the method get_request short dumps with OBJECTS_OBJREF_NOT_ASSIGNED. Why is that? Cant I simple catch this exception and continue processing. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;get_request is an inherited method and I can not change the code in it. But I do want to thandle the exception but cant seem to find a way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 07 Sep 2010 19:09:04 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-09-07T19:09:04Z</dc:date>
    <item>
      <title>Catching an exception when calling a method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/catching-an-exception-when-calling-a-method/m-p/7241092#M1526347</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My program has the following code in it:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

  TRY.
      lv_request = me-&amp;gt;get_request( ).
    CATCH cx_sy_ref_is_initial  INTO lv_error.

  ENDTRY.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I run the code the method get_request short dumps with OBJECTS_OBJREF_NOT_ASSIGNED. Why is that? Cant I simple catch this exception and continue processing. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;get_request is an inherited method and I can not change the code in it. But I do want to thandle the exception but cant seem to find a way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Sep 2010 19:09:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/catching-an-exception-when-calling-a-method/m-p/7241092#M1526347</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-09-07T19:09:04Z</dc:date>
    </item>
    <item>
      <title>Re: Catching an exception when calling a method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/catching-an-exception-when-calling-a-method/m-p/7241093#M1526348</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;what class are we talking about? Probably your method GET_REQUEST calls another method which raises this exception. The exception CX_SY_REF_IS_INITIAL belongs to class CX_DYNAMIC_CHECK. These exceptions have to be handled or explicitly forwarded. It looks like this is not done in method GET_REQUEST.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Sep 2010 01:09:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/catching-an-exception-when-calling-a-method/m-p/7241093#M1526348</guid>
      <dc:creator>mvoros</dc:creator>
      <dc:date>2010-09-08T01:09:24Z</dc:date>
    </item>
    <item>
      <title>Re: Catching an exception when calling a method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/catching-an-exception-when-calling-a-method/m-p/7241094#M1526349</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;what class are we talking about? Probably your method GET_REQUEST calls another method which raises this exception. The exception CX_SY_REF_IS_INITIAL belongs to class CX_DYNAMIC_CHECK. These exceptions have to be handled or explicitly forwarded. It looks like this is not done in method GET_REQUEST.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Sep 2010 01:09:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/catching-an-exception-when-calling-a-method/m-p/7241094#M1526349</guid>
      <dc:creator>mvoros</dc:creator>
      <dc:date>2010-09-08T01:09:24Z</dc:date>
    </item>
    <item>
      <title>Re: Catching an exception when calling a method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/catching-an-exception-when-calling-a-method/m-p/7241095#M1526350</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The method get_request  on is IF_BSP_APPLICATION (not sure which concrete implementation).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway, you have answered my question. Unless the exception is explicitly being 'forwarded' then I cant handle it myself.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alon&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Sep 2010 11:46:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/catching-an-exception-when-calling-a-method/m-p/7241095#M1526350</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-09-08T11:46:41Z</dc:date>
    </item>
  </channel>
</rss>

