Check error return

This commit is contained in:
Las Zenow 2013-07-23 22:40:35 +02:00
parent f1cfb8eea8
commit 9f06d24602

View file

@ -48,7 +48,11 @@ func processFile(req uploadRequest) {
}
book["file"] = id
db.InsertBook(book)
err = db.InsertBook(book)
if err != nil {
log.Println("Error storing metadata (", title, "):", err)
return
}
log.Println("File uploaded:", req.filename)
}