You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
So far the current exceptions thrown have string based messages which is sometimes event differenet between the platforms, whiuch would make it hard to interpret the resulting issue. such as in
for Android which basically are permession denials however they are different strings which means the parser on the app side would need to take care about bopth scenarios and this owuld be way easier if it was error codes and would prevent the issue of someone changing the string inside the library causing the parser on the appp end to fail
Describe the solution you'd like
Have error codes instead of string based exceptions so that the user can interpret the values of the error codes way easier than whole strings.
The text was updated successfully, but these errors were encountered:
Thank you for this feature request. It's a good idea.
The reject method of PluginCall actually supports adding an error code (as string) in addition to an error message, so this could be implemented in a non-breaking way.
Unfortuanatly im not that expecrienced in capacitor plugnis, i believe it would take me longer to implement it. As well as the face that i dont have a MacOS device whiche means iOS development is not possible for me.
However i would also mention that if there is an enum mapping the errors to states it would be nice as i currently saw that the error code as a string.
Is your feature request related to a problem? Please describe.
So far the current exceptions thrown have string based messages which is sometimes event differenet between the platforms, whiuch would make it hard to interpret the resulting issue. such as in
bluetooth-le/ios/Plugin/DeviceManager.swift
Line 50 in 83e2b1b
bluetooth-le/android/src/main/java/com/capacitorjs/community/plugins/bluetoothle/BluetoothLe.kt
Line 139 in 83e2b1b
Describe the solution you'd like
Have error codes instead of string based exceptions so that the user can interpret the values of the error codes way easier than whole strings.
The text was updated successfully, but these errors were encountered: