mirror of https://github.com/zulip/zulip.git
eslint: Fix unicorn/error-message.
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v24.0.0/docs/rules/error-message.md Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
parent
0c4239e387
commit
6acbcec39d
|
@ -237,7 +237,7 @@ exports.warn = function blueslip_warn(msg, more_info) {
|
|||
|
||||
exports.error = function blueslip_error(msg, more_info, stack) {
|
||||
if (stack === undefined) {
|
||||
stack = new Error().stack;
|
||||
stack = new Error("dummy").stack;
|
||||
}
|
||||
const args = build_arg_list(msg, more_info);
|
||||
logger.error(...args);
|
||||
|
|
|
@ -82,7 +82,7 @@ async function get_context(location: StackFrame): Promise<NumberedLine[] | undef
|
|||
}
|
||||
|
||||
export async function display_stacktrace(error: string, stack: string): Promise<void> {
|
||||
const ex = new Error();
|
||||
const ex = new Error("dummy");
|
||||
ex.stack = stack;
|
||||
|
||||
const stackframes: CleanStackFrame[] = await Promise.all(
|
||||
|
|
Loading…
Reference in New Issue