From 8a0ed20e6d57607d38eab01ebd668e9d34eb4281 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 22 Aug 2016 17:26:27 +0200 Subject: [PATCH] Improve error message --- generate-programs-index.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/generate-programs-index.cc b/generate-programs-index.cc index 8e797a5..7383ed0 100644 --- a/generate-programs-index.cc +++ b/generate-programs-index.cc @@ -59,6 +59,7 @@ void mainWrapped(int argc, char * * argv) Path nixpkgsPath = argv[5]; settings.readOnlyMode = true; + settings.showTrace = true; auto localStore = openStore(); auto binaryCache = openStoreAt(argv[3]); @@ -162,6 +163,9 @@ void mainWrapped(int argc, char * * argv) packagesByPath[output.second] = &package; } } catch (AssertionError & e) { + } catch (Error & e) { + e.addPrefix(format("in package ā€˜%sā€™: ") % package.attrPath); + throw; } /* Return the files in a store path, using a SQLite database to cache the results. */