Commit 072e4728 authored by Edward Z. Yang's avatar Edward Z. Yang
Browse files

Try to give a more helpful error message when we can't read LBI.


Signed-off-by: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>
parent 1850acee
......@@ -210,6 +210,10 @@ getPersistBuildConfig_ filename = do
eLBI <- try $ getConfigStateFile filename
case eLBI of
Left (ConfigStateFileBadVersion _ _ (Right lbi)) -> return lbi
Left (ConfigStateFileBadVersion _ _ (Left err)) -> throw err
Left (ConfigStateFileBadVersion _ _ (Left err))
-> error $ "We couldn't understand the build configuration. Try " ++
"building Cabal with a more recent version of itself " ++
"and then running the test suite.\n\nOriginal error: " ++
show err
Left err -> throw err
Right lbi -> return lbi
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment