From b41209eb366a8f362028874d3478a97c3a689e3b Mon Sep 17 00:00:00 2001 From: gr816ox <50945677+gr816ox@users.noreply.github.com> Date: Mon, 16 Jan 2023 13:24:44 +0800 Subject: Add more hint when searched path is wrong Delete the old branch and pull a new one, because of a wrong force push. Git is not as easy as I think. Signed-off-by: gr816ox <50945677+gr816ox@users.noreply.github.com> --- fesvr/htif.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/fesvr/htif.cc b/fesvr/htif.cc index 80ab69b..c70599d 100644 --- a/fesvr/htif.cc +++ b/fesvr/htif.cc @@ -112,6 +112,12 @@ std::map htif_t::load_payload(const std::string& payload, std::string test_path = PREFIX TARGET_DIR + payload; if (access(test_path.c_str(), F_OK) == 0) path = test_path; + else + throw std::runtime_error( + "could not open " + payload + "; searched paths:\n" + + "\t. (current directory)\n" + + "\t" + PREFIX TARGET_DIR + " (based on configured --prefix and --with-target)" + ); } if (path.empty()) -- cgit v1.1