Log all plugin errors as errors
This commit is contained in:
parent
ddda280df4
commit
c2ac126a50
@ -41,13 +41,9 @@ const loadPlugin = async (pluginPath: string, httpServer: HttpServer, args: Args
|
|||||||
field("version", require(path.join(pluginPath, "package.json")).version || "n/a"),
|
field("version", require(path.join(pluginPath, "package.json")).version || "n/a"),
|
||||||
)
|
)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (error.code !== "MODULE_NOT_FOUND") {
|
|
||||||
logger.warn(error.message)
|
|
||||||
} else {
|
|
||||||
logger.error(error.message)
|
logger.error(error.message)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Load all plugins in the specified directory.
|
* Load all plugins in the specified directory.
|
||||||
|
Loading…
Reference in New Issue
Block a user