Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Alex D
GHC
Commits
739a009b
Commit
739a009b
authored
Apr 19, 2012
by
pcapriotti
Browse files
ghci: write exceptions to stderr (#5980)
parent
b35e7e21
Changes
1
Hide whitespace changes
Inline
Side-by-side
ghc/InteractiveUI.hs
View file @
739a009b
...
...
@@ -2837,14 +2837,16 @@ showException :: SomeException -> GHCi ()
showException
se
=
liftIO
$
case
fromException
se
of
-- omit the location for CmdLineError:
Just
(
CmdLineError
s
)
->
put
StrL
n
s
Just
(
CmdLineError
s
)
->
put
Exceptio
n
s
-- ditto:
Just
ph
@
(
PhaseFailed
{})
->
put
StrL
n
(
showGhcException
ph
""
)
Just
other_ghc_ex
->
p
rint
other_ghc_ex
Just
ph
@
(
PhaseFailed
{})
->
put
Exceptio
n
(
showGhcException
ph
""
)
Just
other_ghc_ex
->
p
utException
(
show
other_ghc_ex
)
Nothing
->
case
fromException
se
of
Just
UserInterrupt
->
putStrLn
"Interrupted."
_
->
putStrLn
(
"*** Exception: "
++
show
se
)
Just
UserInterrupt
->
putException
"Interrupted."
_
->
putException
(
"*** Exception: "
++
show
se
)
where
putException
=
hPutStrLn
stderr
-----------------------------------------------------------------------------
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment