Catch PlatformException on checkForUpdate method #107
Catch PlatformException on checkForUpdate method #107fleoparra wants to merge 6 commits intojonasbark:masterfrom
Conversation
Android Studio and VS Code throws handled exceptions as uncaught when there is no an explicit Try Catch call in some cases. For example: flutter/flutter#33427
Kotlin Update
|
It is up to consumers of the plugin to handle a The switch from For the VSCode thing, did you set |
|
@navaronbracke. As you can see on flutter/flutter#33427, if you do not handle a PlatformException properly, there is a problem with try/catch on the editor debugging that code. Maybe for you is not important, but I think that can improve the quality of the library. |
|
@fleoparra According to dart-lang/sdk#37953 the underlying issue has been fixed. But, if you were to add a catch block as you proposed, how would you surface the error to the end user? I.e. "My plugin doesn't do anything if I do this, but why? Oh wait, it is catching an error but I cannot see what the error was since the plugin catches and consumes the error." |
|
@navaronbracke Is weir. Using the latest version of flutter sdk, in my case, the error continues. There is some people with the problem #77. Adding the catch block there is no problem surfacing the error because on catch code there is a If someone has the error, can use: While there is another solution. |

Android Studio and VS Code throws handled exceptions as uncaught when there is no an explicit Try Catch call in some cases. For example:
flutter/flutter#33427