Closed tkem closed 10 years ago
I haven't thought the case through, but if you feel Mopidy should catch these exceptions, please open an issue with Mopidy :-)
First of all, thanks for watching ;-) I'm not sure yet -- I generally have a strong feeling against try-catch blocks that wrap an entire function, but I guess that's just "taste".
There actually may be situations where the local library may want to tell the calling process to just give up and stop it. Referential integrity violations come to mind, where all you can probably do is clear the local lib and start again, hoping for the best. So I guess the current implementation is okay, at least from my POV.
Sounds good :-)
As always, documentation could be improved, I guess ;-)
Contrary to expectation, exceptions raised from
local.Library.add()
are not caught bymopidy local scan
, but abort the import process. Therefore, no exceptions should be raised fromSQLiteLibrary.add()
at all.