mirror of
https://github.com/ilyakooo0/vty.git
synced 2024-11-29 08:49:40 +03:00
installWidthTable: handle and log exceptions raised by readUnicodeWidthTable
This commit is contained in:
parent
16d5f27832
commit
124436e1de
@ -149,12 +149,15 @@ installWidthTable c = do
|
||||
Nothing ->
|
||||
doLog "Current terminal not found in custom character width mapping list"
|
||||
Just path -> do
|
||||
tableResult <- readUnicodeWidthTable path
|
||||
tableResult <- E.try $ readUnicodeWidthTable path
|
||||
case tableResult of
|
||||
Left msg ->
|
||||
Left (e::E.SomeException) ->
|
||||
doLog $ "Error reading custom character width table " <>
|
||||
"at " <> show path <> ": " <> show e
|
||||
Right (Left msg) ->
|
||||
doLog $ "Error reading custom character width table " <>
|
||||
"at " <> show path <> ": " <> msg
|
||||
Right table -> do
|
||||
Right (Right table) -> do
|
||||
installResult <- E.try $ installUnicodeWidthTable table
|
||||
case installResult of
|
||||
Left (e::E.SomeException) ->
|
||||
|
Loading…
Reference in New Issue
Block a user