数据库上的meteor日志记录错误

示例

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

Template.landingPage.postsList = function(){
  try{
    return Posts.find();
  }catch(error){
    //用颜色标记错误(红色)
    console.error(error);
  }
}