File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,8 @@ License : NCSA
4
4
5
5
-}
6
6
7
+ {-# LANGUAGE Strict #-}
8
+
7
9
module Kore.BugReport
8
10
( BugReport (.. )
9
11
, BugReportOption (.. )
@@ -31,6 +33,10 @@ import qualified Data.ByteString.Lazy as ByteString.Lazy
31
33
import Debug
32
34
import qualified Generics.SOP as SOP
33
35
import qualified GHC.Generics as GHC
36
+ import GHC.IO.Exception
37
+ ( IOErrorType (.. )
38
+ , IOException (ioe_type )
39
+ )
34
40
import Options.Applicative
35
41
import System.Directory
36
42
( listDirectory
@@ -138,6 +144,10 @@ withBugReport exeName bugReportOption act =
138
144
optionalWriteBugReport tmpDir
139
145
| Just UserInterrupt == fromException someException ->
140
146
optionalWriteBugReport tmpDir
147
+ | Just (ioe :: IOException ) <- fromException someException
148
+ , NoSuchThing <- ioe_type ioe -> do
149
+ putStrLn $ displayException someException
150
+ optionalWriteBugReport tmpDir
141
151
| otherwise -> do
142
152
let message = displayException someException
143
153
writeFile (tmpDir </> " error" <.> " log" ) message
You can’t perform that action at this time.
0 commit comments