Skip to content

Commit 7344806

Browse files
committed
Conform to use of 'error' in messages to users
1 parent bb40e56 commit 7344806

File tree

5 files changed

+13
-13
lines changed

5 files changed

+13
-13
lines changed

src/Stack/Init.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ instance Pretty InitPrettyException where
111111
]
112112
<> blankLine
113113
<> flow "While downloading the snapshot index, Stack encountered the \
114-
\following exception:"
114+
\following error:"
115115
<> blankLine
116116
<> string (displayException e)
117117

src/Stack/New.hs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,11 @@ instance Pretty NewPrettyException where
106106
where
107107
(msg, isNotFound) = case err of
108108
DownloadHttpError (HttpExceptionRequest req content) ->
109-
let msg' = flow "an HTTP exception. Stack made the request:"
109+
let msg' = flow "an HTTP error. Stack made the request:"
110110
<> blankLine
111111
<> fromString (show req)
112112
<> blankLine
113-
<> flow "and the content of the exception was:"
113+
<> flow "and the content of the error was:"
114114
<> blankLine
115115
<> fromString (show content)
116116
isNotFound404 = case content of
@@ -120,13 +120,13 @@ instance Pretty NewPrettyException where
120120
in (msg', isNotFound404)
121121
DownloadHttpError (InvalidUrlException url' reason) ->
122122
let msg' = fillSep
123-
[ flow "an HTTP exception. The URL"
123+
[ flow "an HTTP error. The URL"
124124
, style Url (fromString url')
125125
, flow "was considered invalid because"
126126
, fromString reason <> "."
127127
]
128128
in (msg', False)
129-
_ -> let msg' = flow "the following exception:"
129+
_ -> let msg' = flow "the following error:"
130130
<> blankLine
131131
<> fromString (displayException err)
132132
in (msg', False)
@@ -149,7 +149,7 @@ instance Pretty NewPrettyException where
149149
, style File (pretty path) <> "."
150150
]
151151
<> blankLine
152-
<> flow "While extracting, Stack encountered the following exception:"
152+
<> flow "While extracting, Stack encountered the following error:"
153153
<> blankLine
154154
<> string err
155155
pretty (TemplateInvalid name why) =
@@ -208,7 +208,7 @@ instance Pretty NewPrettyException where
208208
, style Shell "stack templates" <> "."
209209
]
210210
<> blankLine
211-
<> flow "While downloading, Stack encountered the following exception:"
211+
<> flow "While downloading, Stack encountered the following error:"
212212
<> blankLine
213213
<> string (displayException err)
214214
pretty (TemplatesHelpEncodingInvalid url err) =
@@ -221,7 +221,7 @@ instance Pretty NewPrettyException where
221221
, style Url (fromString url) <> "."
222222
]
223223
<> blankLine
224-
<> flow "While decoding, Stack encountered the following exception:"
224+
<> flow "While decoding, Stack encountered the following error:"
225225
<> blankLine
226226
<> string (displayException err)
227227

@@ -519,7 +519,7 @@ applyTemplate project template nonceParams dir templateText = do
519519
Left e -> throwM $ PrettyException $
520520
TemplateInvalid
521521
template
522-
( flow "Stack encountered the following exception:"
522+
( flow "Stack encountered the following error:"
523523
<> blankLine
524524
-- Text.Parsec.Error.ParseError is not an instance
525525
-- of Control.Exception.

src/Stack/Types/Build.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ instance Pretty BuildPrettyException where
378378
<> flow "Stack failed to execute the build plan."
379379
<> blankLine
380380
<> flow "While executing the build plan, Stack encountered the \
381-
\following exceptions:"
381+
\following errors:"
382382
<> blankLine
383383
<> hcat (L.intersperse blankLine (map ppExceptions es))
384384
where
@@ -406,7 +406,7 @@ pprintExceptions
406406
pprintExceptions exceptions stackYaml stackRoot parentMap wanted' prunedGlobalDeps =
407407
mconcat $
408408
[ flow "While constructing the build plan, Stack encountered the \
409-
\following exceptions:"
409+
\following errors:"
410410
, blankLine
411411
, mconcat (L.intersperse blankLine (mapMaybe pprintException exceptions'))
412412
] ++ if L.null recommendations

src/Stack/Types/Config.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ instance Pretty ConfigPrettyException where
414414
]
415415
<> blankLine
416416
<> flow "While loading and parsing, Stack encountered the following \
417-
\exception:"
417+
\error:"
418418
<> blankLine
419419
<> string (Yaml.prettyPrintParseException exception)
420420
<> blankLine

src/Stack/Types/Storage.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ instance Pretty StoragePrettyException where
2525
<+> style Dir (pretty fp)
2626
<> "."
2727
<> blankLine
28-
<> flow "While migrating the database, Stack encountered the exception:"
28+
<> flow "While migrating the database, Stack encountered the error:"
2929
<> blankLine
3030
<> string exMsg
3131
<> blankLine

0 commit comments

Comments
 (0)