Fix uncaught exception of zcl_abapgit_repo_srv (#4215)

When repeatedly navigating "back" to the main screen via the "Repository List" [o] button:
If somewhere in this navigation sequence you Remove a repository,
then continue on via "Repository List",
but later you use the GUI's actual "BACK" button, until you have returned to the main screen where that repository still existed,
a short dump occurs as the exception raised by zcl_abapgit_repo_srv=>get in zcl_abapgit_gui_page_repo_view->render_content propagates unhandled

Co-authored-by: Lars Hvam <larshp@hotmail.com>
This commit is contained in:
Constantinos Sourelis 2020-11-23 09:31:26 +02:00 committed by GitHub
parent 45a142785b
commit e51ca12eb5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -186,7 +186,7 @@ ENDCLASS.
CLASS ZCL_ABAPGIT_GUI_PAGE_REPO_VIEW IMPLEMENTATION.
CLASS zcl_abapgit_gui_page_repo_view IMPLEMENTATION.
METHOD apply_order_by.
@ -755,12 +755,12 @@ CLASS ZCL_ABAPGIT_GUI_PAGE_REPO_VIEW IMPLEMENTATION.
gui_services( )->get_hotkeys_ctl( )->register_hotkeys( me ).
gui_services( )->register_event_handler( me ).
" Reinit, for the case of type change
mo_repo = zcl_abapgit_repo_srv=>get_instance( )->get( mo_repo->get_key( ) ).
lo_news = zcl_abapgit_news=>create( mo_repo ).
TRY.
" Reinit, for the case of type change
mo_repo = zcl_abapgit_repo_srv=>get_instance( )->get( mo_repo->get_key( ) ).
lo_news = zcl_abapgit_news=>create( mo_repo ).
CREATE OBJECT ri_html TYPE zcl_abapgit_html.
ri_html->add( |<div class="repo" id="repo{ mv_key }">| ).
ri_html->add( zcl_abapgit_gui_chunk_lib=>render_repo_top(