Revision 6a062ff9
b/htools/Ganeti/HTools/ExtLoader.hs | ||
---|---|---|
116 | 116 |
(case ldresult of |
117 | 117 |
Ok x -> return x |
118 | 118 |
Bad s -> do |
119 |
hPrintf stderr "Error: failed to load data. Details:\n%s\n" s
|
|
120 |
:: IO ()
|
|
119 |
hPrintf stderr |
|
120 |
"Error: failed to load data, aborting. Details:\n%s\n" s:: IO ()
|
|
121 | 121 |
exitWith $ ExitFailure 1 |
122 | 122 |
) |
123 | 123 |
let (fix_msgs, nl) = checkData (cdNodes cdata) (cdInstances cdata) |
b/htools/Ganeti/HTools/Luxi.hs | ||
---|---|---|
59 | 59 |
-> JSValue -- ^ The value we try to convert |
60 | 60 |
-> Result a -- ^ The annotated result |
61 | 61 |
genericConvert otype oname oattr = |
62 |
annotateResult (otype ++ " '" ++ oname ++ "', attribute '" ++ |
|
62 |
annotateResult (otype ++ " '" ++ oname ++ |
|
63 |
"', error while reading attribute '" ++ |
|
63 | 64 |
oattr ++ "'") . fromJVal |
64 | 65 |
|
65 | 66 |
-- * Data querying functionality |
b/htools/Ganeti/HTools/Rapi.hs | ||
---|---|---|
107 | 107 |
-> Result (String, Instance.Instance) |
108 | 108 |
parseInstance ktn a = do |
109 | 109 |
name <- tryFromObj "Parsing new instance" a "name" |
110 |
let owner_name = "Instance '" ++ name ++ "'" |
|
110 |
let owner_name = "Instance '" ++ name ++ "', error while parsing data"
|
|
111 | 111 |
let extract s x = tryFromObj owner_name x s |
112 | 112 |
disk <- extract "disk_usage" a |
113 | 113 |
beparams <- liftM fromJSObject (extract "beparams" a) |
... | ... | |
131 | 131 |
parseNode :: NameAssoc -> [(String, JSValue)] -> Result (String, Node.Node) |
132 | 132 |
parseNode ktg a = do |
133 | 133 |
name <- tryFromObj "Parsing new node" a "name" |
134 |
let desc = "Node '" ++ name ++ "'" |
|
134 |
let desc = "Node '" ++ name ++ "', error while parsing data"
|
|
135 | 135 |
extract s = tryFromObj desc a s |
136 | 136 |
offline <- extract "offline" |
137 | 137 |
drained <- extract "drained" |
Also available in: Unified diff