UNPKG

963 BSource Map (JSON)View Raw
1{"version":3,"file":"errors.js","sources":["../../src/errors.ts"],"sourcesContent":["/**\n * Indicates that the file could not be rendered. If the `cause` property is\n * undefined, this error can be considered as a pure 404, otherwise it can be a\n * 500.\n */\nexport class NotFoundError extends Error {\n\tpath: string;\n\n\tconstructor(\n\t\tpath: string,\n\t\toptions?: {\n\t\t\tcause?: unknown;\n\t\t},\n\t) {\n\t\tif (!options?.cause) {\n\t\t\tsuper(`Could lookup file for path \\`${path}\\``, options);\n\t\t} else {\n\t\t\tsuper(\n\t\t\t\t`Could lookup file for path \\`${path}\\`\\n\\n${options.cause.toString()}`,\n\t\t\t\toptions,\n\t\t\t);\n\t\t}\n\n\t\tthis.path = path;\n\t}\n}\n"],"names":[],"mappings":";;;;;;AAKM,MAAO,sBAAsB,MAAK;AAAA,EAGvC,YACC,MACA,SAEC;AAAA;AAAA;AANF;AAAA;AAQK,QAAA,EAAC,mCAAS,QAAO;AACd,cAAA,gCAAgC,UAAU,OAAO;AAAA,IAAA,OACjD;AACN,cACC,gCAAgC;AAAA;AAAA,EAAa,QAAQ,MAAM,SAAU,KACrE,OAAO;AAAA,IAER;AAED,SAAK,OAAO;AAAA,EACb;AACA;"}
\No newline at end of file