Revert "--json-exceptions"
This reverts commit a325524454
.
Turns out this was predicated on an incorrect belief that json output
didn't already sometimes lack the "key" field. Since json output already
can when `giveup` was used, it seems unncessary to add a whole new
option for this.
This commit is contained in:
parent
7c514d717b
commit
91ba0cc7fd
33 changed files with 115 additions and 304 deletions
22
Messages.hs
22
Messages.hs
|
@ -27,8 +27,6 @@ module Messages (
|
|||
showEndFail,
|
||||
showEndResult,
|
||||
endResult,
|
||||
ExceptionId(..),
|
||||
showException,
|
||||
toplevelWarning,
|
||||
warning,
|
||||
earlyWarning,
|
||||
|
@ -199,26 +197,6 @@ endResult :: Bool -> S.ByteString
|
|||
endResult True = "ok"
|
||||
endResult False = "failed"
|
||||
|
||||
{- Unique ids for different exceptions. Do not change the constructors. -}
|
||||
data ExceptionId
|
||||
= FileNotFound
|
||||
| FileBeyondSymbolicLink
|
||||
deriving (Show)
|
||||
|
||||
{- Displays an message that is not associated with any file being
|
||||
- processed. -}
|
||||
showException :: Bool -> ExceptionId -> StringContainingQuotedPath -> Annex ()
|
||||
showException makeway eid msg = do
|
||||
when makeway $
|
||||
outputMessage JSON.none id "\n"
|
||||
outputException (show eid) (mentionedfile msg)
|
||||
("git-annex: " <> msg <> "\n")
|
||||
where
|
||||
mentionedfile (QuotedPath p) = Just p
|
||||
mentionedfile (a :+: b) = mentionedfile a <|> mentionedfile b
|
||||
mentionedfile (UnquotedString _) = Nothing
|
||||
mentionedfile (UnquotedByteString _) = Nothing
|
||||
|
||||
toplevelWarning :: Bool -> StringContainingQuotedPath -> Annex ()
|
||||
toplevelWarning makeway s = warning' makeway id ("git-annex: " <> s)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue