Files
lexical/scripts/error-codes/formatProdErrorMessage.js
Gerard Rovira 229d86bded Website error codes - lexical.dev/error/<code> (#2574)
* setup website error codes

* generated files

* Revert "generated files"

This reverts commit 84b4f790d572f4a04f9fd1f4f495e31135158e5c.

* Revert "setup website error codes"

This reverts commit 0875ff6fc89c88bebf5e4999baa1475447db9dea.

* use query params instead

* .
2022-07-03 11:21:29 -07:00

24 lines
704 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}; visit https://lexical.dev/docs/error?code=${code} for the full message or ` +
'use the non-minified dev environment for full errors and additional ' +
'helpful warnings.',
);
}
module.exports = formatProdErrorMessage;