diff options
author | David Shah <dave@ds0.me> | 2019-02-25 14:40:38 +0000 |
---|---|---|
committer | David Shah <dave@ds0.me> | 2019-02-25 14:40:38 +0000 |
commit | 81b176e1504a05da65fd5989c3a2d2f389786ab0 (patch) | |
tree | 2835b4cad059da3b2452330d3c5e6b2732f1962b /ecp5/main.cc | |
parent | 031725c80eb6c2c0f922b6fa5be57c42330a8a3b (diff) | |
download | nextpnr-81b176e1504a05da65fd5989c3a2d2f389786ab0.tar.gz nextpnr-81b176e1504a05da65fd5989c3a2d2f389786ab0.tar.bz2 nextpnr-81b176e1504a05da65fd5989c3a2d2f389786ab0.zip |
ecp5: Improve error handling and warning generation in LPF parser
Signed-off-by: David Shah <dave@ds0.me>
Diffstat (limited to 'ecp5/main.cc')
-rw-r--r-- | ecp5/main.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ecp5/main.cc b/ecp5/main.cc index 4f9ac3da..98b6b901 100644 --- a/ecp5/main.cc +++ b/ecp5/main.cc @@ -157,7 +157,10 @@ void ECP5CommandHandler::customAfterLoad(Context *ctx) std::vector<std::string> files = vm["lpf"].as<std::vector<std::string>>(); for (const auto &filename : files) { std::ifstream in(filename); - ctx->applyLPF(filename, in); + if (!in) + log_error("failed to open LPF file '%s'\n", filename.c_str()); + if (!ctx->applyLPF(filename, in)) + log_error("failed to parse LPF file '%s'\n", filename.c_str()); } } } |