diff --git a/aqua.ts b/aqua.ts index bf87a0c..0552796 100644 --- a/aqua.ts +++ b/aqua.ts @@ -131,7 +131,11 @@ export default class Aqua { public async render(filePath: string): Promise { try { return this.textDecoder.decode(await Deno.readFile(filePath)); - }catch { + }catch(error) { + if (error instanceof Deno.errors.PermissionDenied) { + return "Please run your application with the '--allow-read' flag."; + } + return "Could not render file."; } }