mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
[7.x] i18n_extract function enhancement (#32210)
This commit is contained in:
parent
a8253de5b6
commit
e35e1a1a5d
2 changed files with 2 additions and 3 deletions
|
@ -47,7 +47,6 @@
|
|||
"xpack.watcher": "x-pack/plugins/watcher"
|
||||
},
|
||||
"exclude": [
|
||||
"src/core/public/fatal_errors/get_error_info.ts",
|
||||
"src/legacy/ui/ui_render/bootstrap/app_bootstrap.js",
|
||||
"src/legacy/ui/ui_render/ui_render_mixin.js",
|
||||
"x-pack/plugins/infra/server/lib/domains/log_entries_domain/log_entries_domain.ts"
|
||||
|
|
|
@ -22,7 +22,7 @@ import { inspect } from 'util';
|
|||
/**
|
||||
* Produce a string version of an error,
|
||||
*/
|
||||
function formatMessage(error: any) {
|
||||
function formatErrorMessage(error: any) {
|
||||
if (typeof error === 'string') {
|
||||
return error;
|
||||
}
|
||||
|
@ -70,7 +70,7 @@ function formatStack(err: Error) {
|
|||
export function getErrorInfo(error: any, source?: string) {
|
||||
const prefix = source ? source + ': ' : '';
|
||||
return {
|
||||
message: prefix + formatMessage(error),
|
||||
message: prefix + formatErrorMessage(error),
|
||||
stack: formatStack(error),
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue