We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dfe4eb8 commit 5b95268Copy full SHA for 5b95268
src/ble/index.common.ts
@@ -26,10 +26,15 @@ export class BluetoothError extends BaseError {
26
Object.assign(this, properties);
27
}
28
29
+
30
toString() {
- return `[BluetoothError]:${this.message} in:${this.method}${this.status ? ` with status:${this.status}` : ''}${
31
- this.nativeException ? ` with nativeException:${this.nativeException}` : ''
32
- } args: ${JSON.stringify(this.arguments)}`;
+ return `[BluetoothError]:${this.message}${Object.keys(this).map((k) => {
+ if (k === 'message') {
33
+ return '';
34
+ }
35
+ const value = this[k];
36
+ return `,${k}: ${JSON.stringify(value)}`;
37
+ })}`;
38
39
40
0 commit comments