[jmdb] Added exception handling