From c8013d930c6cf4bca9e053907c14d74b7b6ad3e3 Mon Sep 17 00:00:00 2001 From: Scott Nonnenberg Date: Tue, 16 May 2017 16:17:25 -0700 Subject: [PATCH] Proto-loading: Throw if we get an error --- libtextsecure/protobufs.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libtextsecure/protobufs.js b/libtextsecure/protobufs.js index ffa9637a5..253bf51fd 100644 --- a/libtextsecure/protobufs.js +++ b/libtextsecure/protobufs.js @@ -5,6 +5,9 @@ function loadProtoBufs(filename) { return dcodeIO.ProtoBuf.loadProtoFile({root: 'protos', file: filename}, function(error, result) { + if (error) { + throw error; + } var protos = result.build('textsecure'); for (var protoName in protos) { textsecure.protobuf[protoName] = protos[protoName];