aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2016-07-17 10:19:02 +0200
committerTrygve Laugstøl <trygvis@inamo.no>2016-07-17 10:19:02 +0200
commit4251a598c9583601952649829e456ee645a693b5 (patch)
tree146d5ae3c95466c858760fcba60eea8c7d9b4836
parent62e8183d33ae159b9e984d2ef5b4a83656d56a16 (diff)
downloadelfinfo-4251a598c9583601952649829e456ee645a693b5.tar.gz
elfinfo-4251a598c9583601952649829e456ee645a693b5.tar.bz2
elfinfo-4251a598c9583601952649829e456ee645a693b5.tar.xz
elfinfo-4251a598c9583601952649829e456ee645a693b5.zip
o Catch at least std exceptions to show a error message that can start to explain why it failed.
-rw-r--r--elfinfo.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/elfinfo.cpp b/elfinfo.cpp
index 5982dd1..6ddbceb 100644
--- a/elfinfo.cpp
+++ b/elfinfo.cpp
@@ -192,6 +192,8 @@ int main(int argc, char **argv) {
LdScript file = loader.load(ld_filename);
memoryAreas.insert(memoryAreas.end(), file.memoryAreas.begin(), file.memoryAreas.end());
+ } catch (std::exception &e) {
+ errx(EX_DATAERR, "Unhandled exception when parsing LD script. The parser is new and fragile, so please file a bug and send me your LD script: %s", e.what());
} catch (...) {
errx(EX_DATAERR, "Unhandled exception when parsing LD script. The parser is new and fragile, so please file a bug and send me your LD script.");
}