File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -78,8 +78,20 @@ readBinary path =
7878 then
7979 do result <- Binary. decodeFileOrFail path
8080 case result of
81- Right a -> return (Just a)
82- Left _ -> return Nothing
81+ Right a ->
82+ return (Just a)
83+
84+ Left (offset, message) ->
85+ do IO. hPutStrLn IO. stderr $ unlines $
86+ [ " +-------------------------------------------------------------------------------"
87+ , " | Corrupt File: " ++ path
88+ , " | Byte Offset: " ++ show offset
89+ , " | Message: " ++ message
90+ , " | Please report this to https://github.com/elm/compiler/issues"
91+ , " | Trying to continue anyway."
92+ , " +-------------------------------------------------------------------------------"
93+ ]
94+ return Nothing
8395 else
8496 return Nothing
8597
You can’t perform that action at this time.
0 commit comments