Skip to content

Commit

Permalink
pathfinder: error out if mark to jump to does not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
XPhyro committed Aug 18, 2024
1 parent 9a23661 commit a1e7c9e
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/cpp/project/pathfinder/src/cmd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down

0 comments on commit a1e7c9e

Please sign in to comment.