Better exception logging and small pypo exception fix

This commit is contained in:
Albert Santoni 2015-02-26 13:52:51 -05:00
parent 016c89ea96
commit 0b1af01822
2 changed files with 2 additions and 2 deletions

View File

@ -100,7 +100,7 @@ class CcFiles extends BaseCcFiles {
{
$music_dir = Application_Model_MusicDir::getDirByPK($this->getDbDirectory());
if (!$music_dir) {
throw new Exception("Invalid music_dir for file in database.");
throw new Exception("Invalid music_dir for file " . $this->getDbId() . " in database.");
}
$directory = $music_dir->getDirectory();
$filepath = $this->getDbFilepath();

View File

@ -167,7 +167,7 @@ class PypoFile(Thread):
except IOError as e:
logging.debug("Failed to open config file at %s: %s" % (config_path, e.strerror))
sys.exit()
except Exception:
except Exception as e:
logging.debug(e.strerror)
sys.exit()