showEndFail,
showEndResult,
endResult,
- ErrorId(..),
+ MessageId(..),
toplevelFileProblem,
toplevelWarning,
warning,
toplevelMsg :: StringContainingQuotedPath -> StringContainingQuotedPath
toplevelMsg = ("git-annex: " <>)
-toplevelFileProblem :: Bool -> ErrorId -> StringContainingQuotedPath -> String -> RawFilePath -> Maybe Key -> SeekInput -> Annex ()
-toplevelFileProblem makeway errorid msg action file mkey si = do
+toplevelFileProblem :: Bool -> MessageId -> StringContainingQuotedPath -> String -> RawFilePath -> Maybe Key -> SeekInput -> Annex ()
+toplevelFileProblem makeway messageid msg action file mkey si = do
maybeShowJSON' $ JSON.start action (Just file) mkey si
- maybeShowJSON' $ JSON.errorid errorid
+ maybeShowJSON' $ JSON.messageid messageid
warning' makeway id (toplevelMsg (QuotedPath file <> " " <> msg))
maybeShowJSON' $ JSON.end False
addErrorMessage,
note,
info,
- errorid,
+ messageid,
add,
complete,
progress,
putMVar emitLock ()
-- Building up a JSON object can be done by first using start,
--- then add and note and errorid any number of times, and finally
+-- then add and note and messageid any number of times, and finally
-- complete.
type JSONBuilder = Maybe (Object, Bool) -> Maybe (Object, Bool)
String (old <> "\n" <> new)
combinelines new _old = new
-errorid :: ErrorId -> JSONBuilder
-errorid _ Nothing = Nothing
-errorid eid (Just (o, e)) = Just (HM.unionWith replaceold (HM.singleton "errorid" (toJSON' (show eid))) o, e)
+messageid :: MessageId -> JSONBuilder
+messageid _ Nothing = Nothing
+messageid mid (Just (o, e)) = Just (HM.unionWith replaceold (HM.singleton "message-id" (toJSON' (show mid))) o, e)
where
replaceold new _old = new