mirror of
https://github.com/abapGit/abapGit.git
synced 2025-05-01 12:20:51 +08:00
60 lines
1.0 KiB
ABAP
60 lines
1.0 KiB
ABAP
class ZCX_ABAPGIT_2FA_ERROR definition
|
|
public
|
|
inheriting from CX_STATIC_CHECK
|
|
create public .
|
|
|
|
public section.
|
|
|
|
data MV_TEXT type STRING read-only .
|
|
|
|
methods CONSTRUCTOR
|
|
importing
|
|
!TEXTID like TEXTID optional
|
|
!PREVIOUS like PREVIOUS optional
|
|
!MV_TEXT type STRING optional .
|
|
|
|
methods IF_MESSAGE~GET_TEXT
|
|
redefinition .
|
|
protected section.
|
|
|
|
methods GET_DEFAULT_TEXT
|
|
returning
|
|
value(RV_TEXT) type STRING .
|
|
private section.
|
|
ENDCLASS.
|
|
|
|
|
|
|
|
CLASS ZCX_ABAPGIT_2FA_ERROR IMPLEMENTATION.
|
|
|
|
|
|
method CONSTRUCTOR.
|
|
CALL METHOD SUPER->CONSTRUCTOR
|
|
EXPORTING
|
|
TEXTID = TEXTID
|
|
PREVIOUS = PREVIOUS
|
|
.
|
|
me->MV_TEXT = MV_TEXT .
|
|
endmethod.
|
|
|
|
|
|
METHOD get_default_text.
|
|
|
|
rv_text = 'Error in two factor authentication.' ##NO_TEXT.
|
|
|
|
ENDMETHOD.
|
|
|
|
|
|
METHOD if_message~get_text.
|
|
|
|
IF mv_text IS NOT INITIAL.
|
|
result = mv_text.
|
|
ELSEIF get_default_text( ) IS NOT INITIAL.
|
|
result = get_default_text( ).
|
|
ELSE.
|
|
result = super->get_text( ).
|
|
ENDIF.
|
|
|
|
ENDMETHOD.
|
|
ENDCLASS.
|