Files
lexical/scripts/error-codes/formatProdErrorMessage.js
2022-06-15 17:31:12 +01:00

24 lines
669 B
JavaScript

/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
'use strict';
// Do not require this module directly! Use normal `invariant` calls with
// template literal strings. The messages will be replaced with error codes
// during build.
function formatProdErrorMessage(code) {
throw Error(
`Minified Lexical error #${code}; see codes.json for the full message or ` +
'use the non-minified dev environment for full errors and additional ' +
'helpful warnings.',
);
}
module.exports = formatProdErrorMessage;