Fork me on GitHub
#datomic
<
2019-09-22
>
bartuka16:09:51

hi ppl, what is the idiomatic way to verify if a transaction was completed successfully?

favila19:09:12

check the return value of the transact function call

bartuka21:09:54

Datomic usually raises an exception when something goes wrong?

bartuka21:09:32

I don't know if this is something of my setup in Cider or if it's expected to be this way. For some reason, I expected datomic to return me only a map containing the error data

favila12:09:53

and also https://docs.datomic.com/on-prem/clojure/index.html where it returns a future which doesn’t throw until you read it. (You didn’t say which api you were using)

favila12:09:05

but in all cases, check the return value

bartuka12:09:57

Thanks guys, the exception was happening at my REPL. I was reading the future but not able to catch before happen in the REPL. Everything is fine now. Thanks for the links