{"action":"closed","issue":{"url":"https://api.github.com/repos/coursera/shift/issues/6","labels_url":"https://api.github.com/repos/coursera/shift/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/coursera/shift/issues/6/comments","events_url":"https://api.github.com/repos/coursera/shift/issues/6/events","html_url":"https://github.com/coursera/shift/issues/6","id":108986561,"number":6,"title":"ShiftPersistance Manager swallows breaking exception","user":{"login":"BenSchwab","id":1754153,"avatar_url":"https://avatars.githubusercontent.com/u/1754153?v=3","gravatar_id":"","url":"https://api.github.com/users/BenSchwab","html_url":"https://github.com/BenSchwab","followers_url":"https://api.github.com/users/BenSchwab/followers","following_url":"https://api.github.com/users/BenSchwab/following{/other_user}","gists_url":"https://api.github.com/users/BenSchwab/gists{/gist_id}","starred_url":"https://api.github.com/users/BenSchwab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BenSchwab/subscriptions","organizations_url":"https://api.github.com/users/BenSchwab/orgs","repos_url":"https://api.github.com/users/BenSchwab/repos","events_url":"https://api.github.com/users/BenSchwab/events{/privacy}","received_events_url":"https://api.github.com/users/BenSchwab/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-09-30T00:28:08Z","updated_at":"2015-11-13T17:47:37Z","closed_at":"2015-11-13T17:47:37Z","body":"```\r\npublic ShiftPersistenceManager(Context context) {\r\n        TABLE_NAME = TABLE_NAME + context.getPackageName();\r\n        try {\r\n            db = new SnappyDB.Builder(context)\r\n                    .name(TABLE_NAME)\r\n                    .build();\r\n        } catch (Exception e) {\r\n            Log.e(TAG, \"Error creating database\");\r\n            e.printStackTrace();\r\n        }\r\n    }\r\n```\r\nAny exception in this code results in db being null. db is then used as a synchronized field, which throws an error. This results in the real error being lost. \r\n\r\n"}}