Skip to content

Commit 619bd7d

Browse files
authored
Merge pull request #228 from cblair/FIX-MISSING-FILE
FIX-MISSING-FILE adding error handling for missing files on load
2 parents 07ace87 + cc02d65 commit 619bd7d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packages/grpc-native-core/index.js

+5
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,11 @@ exports.load = function load(filename, format, options) {
143143
} finally {
144144
ProtoBuf.convertFieldsToCamelCase = convertFieldsToCamelCaseOriginal;
145145
}
146+
147+
if (!builder) {
148+
throw new Error('Could not load file "' + filename + '"');
149+
}
150+
146151
return loadObject(builder.ns, options);
147152
};
148153

0 commit comments

Comments
 (0)