Commit b5ba9efe authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen
Browse files

Bookmark: Catch ConstraintUnique instead of ConstraintViolation

We only expect a UNIQUE constraint when inserting a duplicated bookmark,
other constraint violation hsould be propagated up the chain as they
would denote a bug
parent ffdd9fb6
......@@ -159,7 +159,7 @@ std::shared_ptr<Bookmark> Bookmark::create( MediaLibraryPtr ml, int64_t time,
if ( insert( ml, self, req, time, mediaId ) == false )
return nullptr;
}
catch ( const sqlite::errors::ConstraintViolation& )
catch ( const sqlite::errors::ConstraintUnique& )
{
return nullptr;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment