mirror of
https://github.com/ilyakooo0/vty.git
synced 2024-11-29 08:49:40 +03:00
installUnicodeWidthTable: use throwIO, not throw
This commit is contained in:
parent
9a9aeb65ea
commit
0d2226cb1a
@ -101,7 +101,7 @@ installUnicodeWidthTable :: UnicodeWidthTable -> IO ()
|
||||
installUnicodeWidthTable table = withInstallLock $ do
|
||||
initResult <- initCustomTable tableSize
|
||||
when (initResult /= 0) $
|
||||
E.throw $ TableInitFailure initResult tableSize
|
||||
E.throwIO $ TableInitFailure initResult tableSize
|
||||
|
||||
forM_ (unicodeWidthTableRanges table) $ \r -> do
|
||||
result <- setCustomTableRange (rangeStart r)
|
||||
@ -110,11 +110,11 @@ installUnicodeWidthTable table = withInstallLock $ do
|
||||
|
||||
when (result /= 0) $ do
|
||||
deallocateCustomTable
|
||||
E.throw $ TableRangeFailure result r
|
||||
E.throwIO $ TableRangeFailure result r
|
||||
|
||||
actResult <- activateCustomTable
|
||||
when (actResult /= 0) $
|
||||
E.throw $ TableActivationFailure actResult
|
||||
E.throwIO $ TableActivationFailure actResult
|
||||
|
||||
------------------------------------------------------------------------
|
||||
-- C imports
|
||||
|
Loading…
Reference in New Issue
Block a user