source: node_modules/redux/src/utils/warning.ts@ e48199a

main
Last change on this file since e48199a was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago

Initial commit

  • Property mode set to 100644
File size: 589 bytes
Line 
1/**
2 * Prints a warning in the console if it exists.
3 *
4 * @param message The warning message.
5 */
6export default function warning(message: string): void {
7 /* eslint-disable no-console */
8 if (typeof console !== 'undefined' && typeof console.error === 'function') {
9 console.error(message)
10 }
11 /* eslint-enable no-console */
12 try {
13 // This error was thrown as a convenience so that if you enable
14 // "break on all exceptions" in your console,
15 // it would pause the execution at this line.
16 throw new Error(message)
17 } catch (e) {} // eslint-disable-line no-empty
18}
Note: See TracBrowser for help on using the repository browser.