Proto-loading: Throw if we get an error
This commit is contained in:
parent
fd7372e67e
commit
c8013d930c
1 changed files with 3 additions and 0 deletions
|
@ -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];
|
||||
|
|
Loading…
Add table
Reference in a new issue