数据库翻盖记录错误

以下示例为 0.5 - 0.7 天,并说明了在数据库尚未填充客户端游标时如何记录错误。

Template.landingPage.postsList = function(){
  try{
    return Posts.find();
  }catch(error){
    //color code the error (red)
    console.error(error);
  }
}