Proto-loading: Throw if we get an error

This commit is contained in:
Scott Nonnenberg 2017-05-16 16:17:25 -07:00
parent fd7372e67e
commit c8013d930c
No known key found for this signature in database
GPG key ID: A4931C09644C654B

View file

@ -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];