prettyTryBlock :: DexFile -> CodeItem -> TryItem -> PP.Doc
prettyTryBlock dex codeItem tryItem =
  vsep [ M.mconcat [ "        0x", word16HexFixed (fromIntegral (tryStartAddr tryItem)), " - 0x", word16HexFixed (fromIntegral end) ]
          , vsep [ "        " <> getTypeName' dex ty <> " -> 0x" <> word16HexFixed (fromIntegral addr)
                    | (ty, addr) <- handlers
                    ]
          , vsep [ "        <any> -> 0x" <> word16HexFixed (fromIntegral addr)
                    | addr <- mapMaybe chAllAddr catches
                    ]
          ]
  where
    end = tryStartAddr tryItem + fromIntegral (tryInsnCount tryItem)
    catches = filter ((== tryHandlerOff tryItem) . fromIntegral . chHandlerOff) (codeHandlers codeItem)
    handlers = M.mconcat (map chHandlers catches)
prettyTryBlock :: DexFile -> CodeItem -> TryItem -> PP.Doc
prettyTryBlock dex codeItem tryItem =
  vsep [ M.mconcat [ "        0x", word16HexFixed (fromIntegral (tryStartAddr tryItem)), " - 0x", word16HexFixed (fromIntegral end) ]
          , vsep [ "        " <> getTypeName' dex ty <> " -> 0x" <> word16HexFixed (fromIntegral addr)
                    | (ty, addr) <- handlers
                    ]
          , vsep [ "        <any> -> 0x" <> word16HexFixed (fromIntegral addr)
                    | addr <- mapMaybe chAllAddr catches
                    ]
          ]
  where
    end = tryStartAddr tryItem + fromIntegral (tryInsnCount tryItem)
    catches = filter ((== tryHandlerOff tryItem) . fromIntegral . chHandlerOff) (codeHandlers codeItem)
    handlers = M.mconcat (map chHandlers catches)
prettyTryBlock dex codeItem tryItem =
  vsep [ M.mconcat [ "        0x", word16HexFixed (fromIntegral (tryStartAddr tryItem)), " - 0x", word16HexFixed (fromIntegral end) ]
          , vsep [ "        " <> getTypeName' dex ty <> " -> 0x" <> word16HexFixed (fromIntegral addr)
                    | (ty, addr) <- handlers
                    ]
          , vsep [ "        <any> -> 0x" <> word16HexFixed (fromIntegral addr)
                    | addr <- mapMaybe chAllAddr catches
                    ]
          ]
  where
    end = tryStartAddr tryItem + fromIntegral (tryInsnCount tryItem)
    catches = filter ((== tryHandlerOff tryItem) . fromIntegral . chHandlerOff) (codeHandlers codeItem)
    handlers = M.mconcat (map chHandlers catches)