summary refs log tree commit diff
path: root/synapse/storage
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-07-09 16:14:46 +0100
committerErik Johnston <erik@matrix.org>2015-07-09 16:14:46 +0100
commited887209520cc3268885c918738734f8b9874c81 (patch)
tree47868d6592b4a21b556af00ec5b39d161ea05f0c /synapse/storage
parentRemove spurious comment (diff)
downloadsynapse-ed887209520cc3268885c918738734f8b9874c81.tar.xz
Handle error slightly better
Diffstat (limited to 'synapse/storage')
-rw-r--r--synapse/storage/receipts.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/storage/receipts.py b/synapse/storage/receipts.py
index c4e6b02bdf..593032713d 100644
--- a/synapse/storage/receipts.py
+++ b/synapse/storage/receipts.py
@@ -188,6 +188,7 @@ class ReceiptsStore(SQLBaseStore):
             linearized_event_id = event_ids[0]
         else:
             # we need to points in graph -> linearized form.
+            # TODO: Make this better.
             def graph_to_linear(txn):
                 query = (
                     "SELECT event_id WHERE room_id = ? AND stream_ordering IN ("
@@ -200,8 +201,7 @@ class ReceiptsStore(SQLBaseStore):
                 if rows:
                     return rows[0][0]
                 else:
-                    # TODO: ARGH?!
-                    return None
+                    raise RuntimeError("Unrecognized event_ids: %r" % (event_ids,))
 
             linearized_event_id = yield self.runInteraction(
                 "insert_receipt_conv", graph_to_linear