Ackpine icon indicating copy to clipboard operation
Ackpine copied to clipboard

Exceptions and Typed errors

Open nvkleban opened this issue 8 months ago • 4 comments

Hi! Thank you for the library, it's really helpful.

While investigating it I found that it's requires wrapping packageInstaller.createSession(apkUri).await() in try\catch block. Have you considered instead of throwing exceptions to pass typed errors instead as you already do, but for all other cases too? It helps with understanding what could happen and react to it before it happens.

For me as user of library I can't really distinguish between InstallFailure.Exceptional and Exception been thrown. One example would be - I encountered FileNotExists exception (when apk file was missing), while I expected some sort of InstallFailure

nvkleban avatar Jun 26 '24 09:06 nvkleban