Notify sync hook errors

master
Nicolò Balzarotti 2019-02-11 20:48:20 +01:00
parent 01e0c780fa
commit f7ac74ef46
No known key found for this signature in database
GPG Key ID: E5900B8AC02DE455
1 changed files with 5 additions and 1 deletions

View File

@ -28,7 +28,11 @@ function background_sync(s::MatrixSync)
@async while sync_enabled
res = sync!(s)
if :sync in keys(hooks)
hooks[:sync](res)
try
hooks[:sync](res)
catch
@warn "Error running hook"
end
end
end
end