We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a46e5cf commit 9fda11eCopy full SHA for 9fda11e
1 file changed
README.md
@@ -109,6 +109,20 @@ Requests:
109
*/
110
setDieType(GoDice.diceTypes)
111
```
112
+
113
+``javascript
114
+ /**
115
+ * In order to catch error on the requestDevice and attemptReconnect methods use an async function and await the die's methods
116
+ * Example:
117
+ */
118
+ async function openConnectionDialog() {
119
+ const newDice = new GoDice();
120
+ try {
121
+ await newDice.requestDevice();
122
+ } catch {
123
+ console.log("Error on connecting die")
124
+ }
125
126
127
128
Responses:
0 commit comments