summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElizabeth Fischer <elizabeth.fischer@columbia.edu>2016-06-22 12:08:28 -0400
committerElizabeth Fischer <elizabeth.fischer@columbia.edu>2016-06-22 12:11:09 -0400
commitffe9e77e36ca2c64ff8d2ebdc14c6b04d1184d15 (patch)
tree0fa41ccd70e2536dc373acd1d40cdceb52376320
parent86893e3dc4a82588e18c8832c4a8811fb5e83273 (diff)
downloadspack-ffe9e77e36ca2c64ff8d2ebdc14c6b04d1184d15.tar.gz
spack-ffe9e77e36ca2c64ff8d2ebdc14c6b04d1184d15.tar.bz2
spack-ffe9e77e36ca2c64ff8d2ebdc14c6b04d1184d15.tar.xz
spack-ffe9e77e36ca2c64ff8d2ebdc14c6b04d1184d15.zip
Improved Spack database errors to help users fix them.
-rw-r--r--lib/spack/spack/database.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/spack/spack/database.py b/lib/spack/spack/database.py
index f941346bb1..9b0e88b9ad 100644
--- a/lib/spack/spack/database.py
+++ b/lib/spack/spack/database.py
@@ -631,11 +631,11 @@ class WriteTransaction(_Transaction):
class CorruptDatabaseError(SpackError):
def __init__(self, path, msg=''):
super(CorruptDatabaseError, self).__init__(
- "Spack database is corrupt: %s. %s" % (path, msg))
+ "Spack database is corrupt: %s. %s. Try running `spack reindex` to fix." % (path, msg))
class InvalidDatabaseVersionError(SpackError):
def __init__(self, expected, found):
super(InvalidDatabaseVersionError, self).__init__(
- "Expected database version %s but found version %s" %
+ "Expected database version %s but found version %s. Try running `spack reindex` to fix." %
(expected, found))