diff --git a/src/Entity.js b/src/Entity.js index 1a14797e4523b17b108aee8e24680d98e69ffa8c..d43409f87acd5dff18f1d5a7396b818f7b603333 100644 --- a/src/Entity.js +++ b/src/Entity.js @@ -55,7 +55,7 @@ export class Entity { getFilePath() { if (!this.isFile()) { - throw `Only FILE entities can have a file path.`; + throw new Error(`Only FILE entities can have a file path.`); } const fileDescriptor = this.wrappedEntity.getFileDescriptor(); return fileDescriptor.getPath();