[Location Plugin] Suggestion: Use meaningful values for error codes

Forge Component
Published on 19 Mar by OutSystems R&D
28 votes
Published on 19 Mar by OutSystems R&D

When we get an error from this plugin we can only programmatically check an Integer value and we have to add documentation about which error code is supposed to mean what. 

Could you add a static entity with error codes so that we can check whether an errorcode is (for instance) Entities.GPSErrorCode.PermissionDenied instead of the number 100. This makes it a lot more readable and if the constant changes in the future the plugin can simply change the numeric value of PermissionDenied instead of breaking our comparisons.

I ran into this when I updated the plugin and apparently errorcode 1 only means "no permission" in the browser nowadays where errorcode 100 means "no permission" on my Android phone. I had to debug on my phone to find this out, it would have been so much easier to see a static entity with 2 different codes that mean the same so that I know I need to check both.