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

泪湿孤枕 提交于 2019-12-07 12:19:36

问题


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?

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?

来源:https://stackoverflow.com/questions/49132183/when-is-catch-called-when-using-docref-get-in-firestore

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!