From a1e7c9eb86e9731225ed90dd1ca0877a1edc30a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Berke=20Kocao=C4=9Flu?= Date: Sun, 18 Aug 2024 12:54:31 +0300 Subject: [PATCH] pathfinder: error out if mark to jump to does not exist --- src/cpp/project/pathfinder/src/cmd.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/cpp/project/pathfinder/src/cmd.cpp b/src/cpp/project/pathfinder/src/cmd.cpp index 0e0c81a3..7c2a265a 100644 --- a/src/cpp/project/pathfinder/src/cmd.cpp +++ b/src/cpp/project/pathfinder/src/cmd.cpp @@ -272,12 +272,9 @@ PAF_CMD_NORETURN void paf::jump::execute(const lyra::group& group) auto db = db::get_db(db_type::directory); auto dir = db.try_get_mark(*m_keycode); - if (!dir) - goto err; - + xph::die_if(!dir, "keycode [", *m_keycode, "] not found in database"); std::cout << *dir << '\n'; -err: PAF_CMD_EXIT(); }