@@ -40,7 +40,7 @@ export class BarcodeScannerWeb
4040
4141 async startScan ( options ?: StartScanOptions ) : Promise < void > {
4242 if ( ! this . _isSupported ) {
43- throw this . createUnavailableException ( ) ;
43+ throw this . createUnimplementedException ( ) ;
4444 }
4545 if ( ! options ?. videoElement ) {
4646 throw new Error ( this . errorVideoElementMissing ) ;
@@ -73,7 +73,7 @@ export class BarcodeScannerWeb
7373
7474 async stopScan ( ) : Promise < void > {
7575 if ( ! this . _isSupported ) {
76- throw this . createUnavailableException ( ) ;
76+ throw this . createUnimplementedException ( ) ;
7777 }
7878 if ( this . intervalId ) {
7979 clearInterval ( this . intervalId ) ;
@@ -92,63 +92,63 @@ export class BarcodeScannerWeb
9292 async readBarcodesFromImage (
9393 _options : ReadBarcodesFromImageOptions ,
9494 ) : Promise < ReadBarcodesFromImageResult > {
95- throw this . createUnavailableException ( ) ;
95+ throw this . createUnimplementedException ( ) ;
9696 }
9797
9898 async scan ( ) : Promise < ScanResult > {
99- throw this . createUnavailableException ( ) ;
99+ throw this . createUnimplementedException ( ) ;
100100 }
101101
102102 async isSupported ( ) : Promise < IsSupportedResult > {
103103 return { supported : this . _isSupported } ;
104104 }
105105
106106 async enableTorch ( ) : Promise < void > {
107- throw this . createUnavailableException ( ) ;
107+ throw this . createUnimplementedException ( ) ;
108108 }
109109
110110 async disableTorch ( ) : Promise < void > {
111- throw this . createUnavailableException ( ) ;
111+ throw this . createUnimplementedException ( ) ;
112112 }
113113
114114 async toggleTorch ( ) : Promise < void > {
115- throw this . createUnavailableException ( ) ;
115+ throw this . createUnimplementedException ( ) ;
116116 }
117117
118118 async isTorchEnabled ( ) : Promise < IsTorchEnabledResult > {
119- throw this . createUnavailableException ;
119+ throw this . createUnimplementedException ( ) ;
120120 }
121121
122122 async isTorchAvailable ( ) : Promise < IsTorchAvailableResult > {
123123 return { available : false } ;
124124 }
125125
126126 async setZoomRatio ( _options : SetZoomRatioOptions ) : Promise < void > {
127- throw this . createUnavailableException ( ) ;
127+ throw this . createUnimplementedException ( ) ;
128128 }
129129
130130 async getZoomRatio ( ) : Promise < GetZoomRatioResult > {
131- throw this . createUnavailableException ( ) ;
131+ throw this . createUnimplementedException ( ) ;
132132 }
133133
134134 async getMinZoomRatio ( ) : Promise < GetMinZoomRatioResult > {
135- throw this . createUnavailableException ( ) ;
135+ throw this . createUnimplementedException ( ) ;
136136 }
137137
138138 async getMaxZoomRatio ( ) : Promise < GetMaxZoomRatioResult > {
139- throw this . createUnavailableException ( ) ;
139+ throw this . createUnimplementedException ( ) ;
140140 }
141141
142142 async openSettings ( ) : Promise < void > {
143- throw this . createUnavailableException ( ) ;
143+ throw this . createUnimplementedException ( ) ;
144144 }
145145
146146 async isGoogleBarcodeScannerModuleAvailable ( ) : Promise < IsGoogleBarcodeScannerModuleAvailableResult > {
147- throw this . createUnavailableException ( ) ;
147+ throw this . createUnimplementedException ( ) ;
148148 }
149149
150150 async installGoogleBarcodeScannerModule ( ) : Promise < void > {
151- throw this . createUnavailableException ( ) ;
151+ throw this . createUnimplementedException ( ) ;
152152 }
153153
154154 async checkPermissions ( ) : Promise < PermissionStatus > {
@@ -180,10 +180,10 @@ export class BarcodeScannerWeb
180180 }
181181 }
182182
183- private createUnavailableException ( ) : CapacitorException {
183+ private createUnimplementedException ( ) : CapacitorException {
184184 return new CapacitorException (
185- 'This plugin method is not available on this platform .' ,
186- ExceptionCode . Unavailable ,
185+ 'This method is not implemented on web .' ,
186+ ExceptionCode . Unimplemented ,
187187 ) ;
188188 }
189189
0 commit comments