diff --git a/app/Console/Command/SonerezhShell.php b/app/Console/Command/SonerezhShell.php
index aca9dd4..8f24ff4 100644
--- a/app/Console/Command/SonerezhShell.php
+++ b/app/Console/Command/SonerezhShell.php
@@ -125,8 +125,16 @@ public function import() {
}
$this->Song->create();
- if (!$this->Song->save($parse_result['data'])) {
- $this->overwrite("[ERR][$file] - Unable to save the song metadata to the database");
+ $status = false;
+ $message = "[ERR][$file] - Unable to save the song metadata to the database";
+ try {
+ $status = $this->Song->save($parse_result['data']);
+ }
+ catch (\Exception $e) {
+ $message = $e->getMessage();
+ }
+ if (!$status) {
+ $this->overwrite($message);
}
// Progressbar
@@ -155,4 +163,4 @@ public function refreshSyncToken() {
$settings['Setting']['sync_token'] = time();
$this->Setting->save($settings);
}
-}
\ No newline at end of file
+}