Skip to content

Commit bcdf43c

Browse files
committed
feat: use debug message instead when user config not found
1 parent a73ecd3 commit bcdf43c

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

denops/fall/config.ts

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,16 @@ export async function loadUserConfig(
6666
const { main } = await import(`${path}${suffix ?? ""}`);
6767
reset();
6868
await main(ctx);
69-
} catch (e) {
70-
console.warn(
71-
`Failed to load user config. Fallback to the default config: ${e}`,
72-
);
69+
} catch (err) {
70+
if (err instanceof Deno.errors.NotFound) {
71+
console.debug(
72+
`User config not found: '${path}'. Fallback to the default config.`,
73+
);
74+
} else {
75+
console.warn(
76+
`Failed to load user config. Fallback to the default config: ${err}`,
77+
);
78+
}
7379
const { main } = await import(
7480
new URL("./_assets/default.config.ts", import.meta.url).href
7581
);

0 commit comments

Comments
 (0)