From 5c1b89dfc90741d42ff25f28bf83fa2e3ff26e95 Mon Sep 17 00:00:00 2001 From: Tankred Hase Date: Thu, 23 May 2013 23:12:38 +0200 Subject: [PATCH] added error handling in lawnchair dao --- src/js/dao/lawnchair-dao.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/js/dao/lawnchair-dao.js b/src/js/dao/lawnchair-dao.js index 16d6a21..16bc18c 100644 --- a/src/js/dao/lawnchair-dao.js +++ b/src/js/dao/lawnchair-dao.js @@ -6,7 +6,11 @@ app.dao.LawnchairDAO = function(window) { var db = new Lawnchair({ name: 'data-store' - }, function() {}); + }, function(lc) { + if (!lc) { + throw new Error('Lawnchair init failed!'); + } + }); /** * Create or update an object