When is catch() called when using docRef.get() in

2019-05-10 22:45发布

In Angular 5 with FireStore and angularfire2, when retrieving the contents of a single document using docRef.get(), what scenario would cause the catch statement to be executed? How can I produce such an error?

enter image description here

If I interpret the note below the code correctly, it means that if there is no document, it will return null, rather than throwing an error.

So my question is, in what case would it actually throw an error and go into the catch statement?

0条回答
登录 后发表回答