FIX-MISSING-FILE adding error handling for missing files on load

This commit is contained in:
Colby Blair 2018-03-16 09:58:53 -06:00
parent 07ace87c1a
commit 08b39b5991
3 changed files with 7 additions and 2 deletions

View File

@ -1,6 +1,6 @@
{
"name": "grpc-js-repository",
"version": "0.1.0",
"version": "0.1.1",
"description": "Dummy package for the grpc-node repository",
"private": true,
"keywords": [],

View File

@ -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);
};

View File

@ -1,6 +1,6 @@
{
"name": "grpc",
"version": "1.10.0-dev",
"version": "1.10.1-dev",
"author": "Google Inc.",
"description": "gRPC Library for Node",
"homepage": "https://grpc.io/",