mirror of
https://github.com/louislam/uptime-kuma.git
synced 2026-01-16 23:48:44 -05:00
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Frank Elsinga <frank@elsinga.de>
17 lines
449 B
JavaScript
17 lines
449 B
JavaScript
class TranslatableError extends Error {
|
|
/**
|
|
* Error whose message is a translation key.
|
|
* @augments Error
|
|
*/
|
|
/**
|
|
* Create a TranslatableError.
|
|
* @param {string} key - Translation key present in src/lang/en.json
|
|
*/
|
|
constructor(key) {
|
|
super(key);
|
|
this.msgi18n = true;
|
|
this.key = key;
|
|
Error.captureStackTrace(this, this.constructor);
|
|
}
|
|
}
|
|
module.exports = TranslatableError;
|