Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Error : Old and new exceptions cannot be used at the same time.

Former Member
0 Likes
1,129

HI ALL,

i build a new exception class with message class and i want to replace the

old exception that i had in the method ,what i did is delete the exception from the method

signature and add the exception class .

the problem is that when i try to activate the method i get error :

Old and new exceptions cannot be used at the same time.

CALL FUNCTION 'CALCULATE_HASH_FOR_CHAR'
      EXPORTING
        alg            = 'MD5'
        data           = iv_iss
      IMPORTING
        hash           = lv_issu
      EXCEPTIONS
        unknown_alg    = 1
        param_error    = 2
        internal_error = 3
        OTHERS         = 4.
    IF sy-subrc <> 0.

      RAISE EXCEPTION TYPE cx_user_mng EXPORTING
      textid = cx_user_mng=>wrong_isrs.
    ENDIF.

I want to use the new exception class ,

how can i avoid this error ?

Best Regards

Edited by: Joy Stpr on Jul 22, 2009 2:56 PM

Edited by: Joy Stpr on Jul 22, 2009 3:16 PM

HI ALL,

i build a new exception class with message class and i want to replace the

old exception that i had in the method ,what i did is delete the exception from the method

signature and add the exception class .

the problem is that when i try to activate the method i get error :

Old and new exceptions cannot be used at the same time.

CALL FUNCTION 'CALCULATE_HASH_FOR_CHAR'
      EXPORTING
        alg            = 'MD5'
        data           = iv_iss
      IMPORTING
        hash           = lv_issu
      EXCEPTIONS
        unknown_alg    = 1
        param_error    = 2
        internal_error = 3
        OTHERS         = 4.
    IF sy-subrc <> 0.

      RAISE EXCEPTION TYPE cx_user_mng EXPORTING
      textid = cx_user_mng=>wrong_isrs.
    ENDIF.

I want to use the new exception class ,

how can i avoid this error ?

Best Regards

Edited by: Joy Stpr on Jul 22, 2009 2:56 PM

Edited by: Joy Stpr on Jul 22, 2009 3:16 PM

1 REPLY 1
Read only

Former Member
0 Likes
509

Hi Joy,

Check this link.

[Old and New Exceptions Cannot be used at same time|;

Regards,

Lakshman.