File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,6 @@ import qualified Data.Aeson as Aeson
4040import qualified Text.Pandoc.UTF8 as UTF8
4141import qualified Data.Text.IO as TIO
4242import qualified Data.ByteString.Lazy as BL
43- import Text.Pandoc.Error (renderError , PandocError )
4443import Text.Pandoc.Logging (showLogMessage )
4544#else
4645import System.Exit
@@ -62,7 +61,7 @@ foreign export ccall "wasm_main" wasm_main :: Ptr CChar -> Int -> IO ()
6261
6362wasm_main :: Ptr CChar -> Int -> IO ()
6463wasm_main raw_args_ptr raw_args_len =
65- catch act (\ (err :: SomeException ) -> writeFile " /stderr" (show err))
64+ E. catch act (\ (err :: SomeException ) -> writeFile " /stderr" (displayException err))
6665 where
6766 act = do
6867 args <- peekCStringLen (raw_args_ptr, raw_args_len)
@@ -76,8 +75,7 @@ wasm_main raw_args_ptr raw_args_len =
7675 , optOutputFile = Just $ fromMaybe " /stdout" (optOutputFile opts)
7776 , optLogFile = Just $ fromMaybe " /warnings" (optLogFile opts)
7877 }
79- E. catch (convertWithOpts engine opts') $
80- \ (e :: PandocError ) -> TIO. writeFile " /stderr" (renderError e)
78+ convertWithOpts engine opts'
8179 res <- Aeson. eitherDecode <$> BL. readFile " /warnings"
8280 case res of
8381 Left e -> writeFile " /stderr" e
You can’t perform that action at this time.
0 commit comments