Skip to content

Commit

Permalink
Merge pull request #228 from cblair/FIX-MISSING-FILE
Browse files Browse the repository at this point in the history
FIX-MISSING-FILE adding error handling for missing files on load
  • Loading branch information
murgatroid99 authored Mar 16, 2018
2 parents 07ace87 + cc02d65 commit 619bd7d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/grpc-native-core/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,11 @@ exports.load = function load(filename, format, options) {
} finally {
ProtoBuf.convertFieldsToCamelCase = convertFieldsToCamelCaseOriginal;
}

if (!builder) {
throw new Error('Could not load file "' + filename + '"');
}

return loadObject(builder.ns, options);
};

Expand Down

0 comments on commit 619bd7d

Please sign in to comment.