Commit ec80ee1f authored by Aron Carroll's avatar Aron Carroll

Throw uncaught errors when using promises

parent 6736daf7
......@@ -73,7 +73,7 @@ class Annotator.Guest extends Annotator
this.publish(event, args)
formatter: (annotation) =>
formatted = {}
formatted['uri'] = @getHref()
formatted.uri = @getHref()
for k, v of annotation when k isnt 'anchors'
formatted[k] = v
# Work around issue in jschannel where a repeated object is considered
......@@ -181,6 +181,8 @@ class Annotator.Guest extends Annotator
trans.complete
uri: @getHref()
metadata: @getMetadata()
.catch (e) ->
setTimeout -> throw e
trans.delayReturn(true)
bridge.on 'setTool', (ctx, name) =>
......
Markdown is supported
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