@@ -297,7 +297,11 @@ export class Firestore
297
297
collection ( this . _delegate , pathString )
298
298
) ;
299
299
} catch ( e ) {
300
- throw replaceFunctionName ( e as Error , 'collection()' , 'Firestore.collection()' ) ;
300
+ throw replaceFunctionName (
301
+ e as Error ,
302
+ 'collection()' ,
303
+ 'Firestore.collection()'
304
+ ) ;
301
305
}
302
306
}
303
307
@@ -314,7 +318,7 @@ export class Firestore
314
318
return new Query ( this , collectionGroup ( this . _delegate , collectionId ) ) ;
315
319
} catch ( e ) {
316
320
throw replaceFunctionName (
317
- e as Error ,
321
+ e as Error ,
318
322
'collectionGroup()' ,
319
323
'Firestore.collectionGroup()'
320
324
) ;
@@ -718,7 +722,11 @@ export class DocumentReference<T = PublicDocumentData>
718
722
return setDoc ( this . _delegate , value as WithFieldValue < T > ) ;
719
723
}
720
724
} catch ( e ) {
721
- throw replaceFunctionName ( e as Error , 'setDoc()' , 'DocumentReference.set()' ) ;
725
+ throw replaceFunctionName (
726
+ e as Error ,
727
+ 'setDoc()' ,
728
+ 'DocumentReference.set()'
729
+ ) ;
722
730
}
723
731
}
724
732
@@ -745,7 +753,11 @@ export class DocumentReference<T = PublicDocumentData>
745
753
) ;
746
754
}
747
755
} catch ( e ) {
748
- throw replaceFunctionName ( e as Error , 'updateDoc()' , 'DocumentReference.update()' ) ;
756
+ throw replaceFunctionName (
757
+ e as Error ,
758
+ 'updateDoc()' ,
759
+ 'DocumentReference.update()'
760
+ ) ;
749
761
}
750
762
}
751
763
@@ -991,7 +1003,11 @@ export class Query<T = PublicDocumentData>
991
1003
query ( this . _delegate , where ( fieldPath as string , opStr , value ) )
992
1004
) ;
993
1005
} catch ( e ) {
994
- throw replaceFunctionName ( e as Error , / ( o r d e r B y | w h e r e ) \( \) / , 'Query.$1()' ) ;
1006
+ throw replaceFunctionName (
1007
+ e as Error ,
1008
+ / ( o r d e r B y | w h e r e ) \( \) / ,
1009
+ 'Query.$1()'
1010
+ ) ;
995
1011
}
996
1012
}
997
1013
@@ -1008,7 +1024,11 @@ export class Query<T = PublicDocumentData>
1008
1024
query ( this . _delegate , orderBy ( fieldPath as string , directionStr ) )
1009
1025
) ;
1010
1026
} catch ( e ) {
1011
- throw replaceFunctionName ( e as Error , / ( o r d e r B y | w h e r e ) \( \) / , 'Query.$1()' ) ;
1027
+ throw replaceFunctionName (
1028
+ e as Error ,
1029
+ / ( o r d e r B y | w h e r e ) \( \) / ,
1030
+ 'Query.$1()'
1031
+ ) ;
1012
1032
}
1013
1033
}
1014
1034
@@ -1027,7 +1047,11 @@ export class Query<T = PublicDocumentData>
1027
1047
query ( this . _delegate , limitToLast ( n ) )
1028
1048
) ;
1029
1049
} catch ( e ) {
1030
- throw replaceFunctionName ( e as Error , 'limitToLast()' , 'Query.limitToLast()' ) ;
1050
+ throw replaceFunctionName (
1051
+ e as Error ,
1052
+ 'limitToLast()' ,
1053
+ 'Query.limitToLast()'
1054
+ ) ;
1031
1055
}
1032
1056
}
1033
1057
@@ -1046,7 +1070,11 @@ export class Query<T = PublicDocumentData>
1046
1070
query ( this . _delegate , startAfter ( ...args ) )
1047
1071
) ;
1048
1072
} catch ( e ) {
1049
- throw replaceFunctionName ( e as Error , 'startAfter()' , 'Query.startAfter()' ) ;
1073
+ throw replaceFunctionName (
1074
+ e as Error ,
1075
+ 'startAfter()' ,
1076
+ 'Query.startAfter()'
1077
+ ) ;
1050
1078
}
1051
1079
}
1052
1080
@@ -1265,7 +1293,11 @@ export class CollectionReference<T = PublicDocumentData>
1265
1293
) ;
1266
1294
}
1267
1295
} catch ( e ) {
1268
- throw replaceFunctionName ( e as Error , 'doc()' , 'CollectionReference.doc()' ) ;
1296
+ throw replaceFunctionName (
1297
+ e as Error ,
1298
+ 'doc()' ,
1299
+ 'CollectionReference.doc()'
1300
+ ) ;
1269
1301
}
1270
1302
}
1271
1303
0 commit comments