---
htools/Ganeti/HTools/ExtLoader.hs | 4 ++--
htools/Ganeti/HTools/Luxi.hs | 3 ++-
htools/Ganeti/HTools/Rapi.hs | 4 ++--
3 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/htools/Ganeti/HTools/ExtLoader.hs
b/htools/Ganeti/HTools/ExtLoader.hs
index 9be8dc7..3374de6 100644
--- a/htools/Ganeti/HTools/ExtLoader.hs
+++ b/htools/Ganeti/HTools/ExtLoader.hs
@@ -116,8 +116,8 @@ loadExternalData opts = do
(case ldresult of
Ok x -> return x
Bad s -> do
- hPrintf stderr "Error: failed to load data. Details:\n%s\n" s
- :: IO ()
+ hPrintf stderr
+ "Error: failed to load data, aborting. Details:\n%s\n" s:: IO ()
exitWith $ ExitFailure 1
)
let (fix_msgs, nl) = checkData (cdNodes cdata) (cdInstances cdata)
diff --git a/htools/Ganeti/HTools/Luxi.hs b/htools/Ganeti/HTools/Luxi.hs
index d918ecf..28128fc 100644
--- a/htools/Ganeti/HTools/Luxi.hs
+++ b/htools/Ganeti/HTools/Luxi.hs
@@ -59,7 +59,8 @@ genericConvert :: (Text.JSON.JSON a) =>
-> JSValue -- ^ The value we try to convert
-> Result a -- ^ The annotated result
genericConvert otype oname oattr =
- annotateResult (otype ++ " '" ++ oname ++ "', attribute '" ++
+ annotateResult (otype ++ " '" ++ oname ++
+ "', error while reading attribute '" ++
oattr ++ "'") . fromJVal
-- * Data querying functionality
diff --git a/htools/Ganeti/HTools/Rapi.hs b/htools/Ganeti/HTools/Rapi.hs
index 936fc44..fbcbf4b 100644
--- a/htools/Ganeti/HTools/Rapi.hs
+++ b/htools/Ganeti/HTools/Rapi.hs
@@ -107,7 +107,7 @@ parseInstance :: NameAssoc
-> Result (String, Instance.Instance)
parseInstance ktn a = do
name <- tryFromObj "Parsing new instance" a "name"
- let owner_name = "Instance '" ++ name ++ "'"
+ let owner_name = "Instance '" ++ name ++ "', error while parsing data"
let extract s x = tryFromObj owner_name x s
disk <- extract "disk_usage" a
beparams <- liftM fromJSObject (extract "beparams" a)
@@ -131,7 +131,7 @@ parseInstance ktn a = do
parseNode :: NameAssoc -> [(String, JSValue)] -> Result (String, Node.Node)
parseNode ktg a = do
name <- tryFromObj "Parsing new node" a "name"
- let desc = "Node '" ++ name ++ "'"
+ let desc = "Node '" ++ name ++ "', error while parsing data"
extract s = tryFromObj desc a s
offline <- extract "offline"
drained <- extract "drained"
--
1.7.3.1