Proto-loading: Throw if we get an error
This commit is contained in:
@@ -5,6 +5,9 @@
|
|||||||
|
|
||||||
function loadProtoBufs(filename) {
|
function loadProtoBufs(filename) {
|
||||||
return dcodeIO.ProtoBuf.loadProtoFile({root: 'protos', file: filename}, function(error, result) {
|
return dcodeIO.ProtoBuf.loadProtoFile({root: 'protos', file: filename}, function(error, result) {
|
||||||
|
if (error) {
|
||||||
|
throw error;
|
||||||
|
}
|
||||||
var protos = result.build('textsecure');
|
var protos = result.build('textsecure');
|
||||||
for (var protoName in protos) {
|
for (var protoName in protos) {
|
||||||
textsecure.protobuf[protoName] = protos[protoName];
|
textsecure.protobuf[protoName] = protos[protoName];
|
||||||
|
Reference in New Issue
Block a user