From 0b1af01822c80d494037c1d1a53632a5b249c576 Mon Sep 17 00:00:00 2001 From: Albert Santoni Date: Thu, 26 Feb 2015 13:52:51 -0500 Subject: [PATCH] Better exception logging and small pypo exception fix --- airtime_mvc/application/models/airtime/CcFiles.php | 2 +- python_apps/pypo/pypofile.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/airtime_mvc/application/models/airtime/CcFiles.php b/airtime_mvc/application/models/airtime/CcFiles.php index 2ca2fac46..15bb3061e 100644 --- a/airtime_mvc/application/models/airtime/CcFiles.php +++ b/airtime_mvc/application/models/airtime/CcFiles.php @@ -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(); diff --git a/python_apps/pypo/pypofile.py b/python_apps/pypo/pypofile.py index 829c3fe23..3e5a400e5 100644 --- a/python_apps/pypo/pypofile.py +++ b/python_apps/pypo/pypofile.py @@ -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()