From 0a67f95c114efa08bff485b1aaf692bd6ed343c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Frederik=20Hud=C3=A1k?= Date: Sat, 23 May 2020 11:42:41 +0200 Subject: [PATCH] Replace assert in gui_page_stage with check (#3392) * Update zcl_abapgit_gui_page_stage.clas.abap * Change to exception * add reference to issue as comment in code * Update zcl_abapgit_gui_page_stage.clas.abap Co-authored-by: Lars Hvam --- src/ui/zcl_abapgit_gui_page_stage.clas.abap | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/ui/zcl_abapgit_gui_page_stage.clas.abap b/src/ui/zcl_abapgit_gui_page_stage.clas.abap index 1849312d3..0901839d2 100644 --- a/src/ui/zcl_abapgit_gui_page_stage.clas.abap +++ b/src/ui/zcl_abapgit_gui_page_stage.clas.abap @@ -600,7 +600,12 @@ CLASS ZCL_ABAPGIT_GUI_PAGE_STAGE IMPLEMENTATION. WITH TABLE KEY path = ls_file-path filename = ls_file-filename. - ASSERT sy-subrc = 0. + IF sy-subrc <> 0. +* see https://github.com/larshp/abapGit/issues/3073 + zcx_abapgit_exception=>raise( iv_text = + |Unable to stage { ls_file-filename }. If the filename contains spaces, this is a known issue.| && + | Consider ignoring or staging the file at a later time.| ). + ENDIF. CASE -value. WHEN zif_abapgit_definitions=>c_method-add.