Implemented better error handling in abstractcontainer and better error handling in databasehandlerinstance