{"record":{"id":"0fdf5c003935b04d","repo":"emberjs/ember.js","slug":"warning-message","errorCode":null,"errorMessage":"WARNING: ${message}","messagePattern":"WARNING: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/@ember/debug/lib/warn.ts","lineNumber":66,"sourceCode":"          <li> <code>id</code> - An id of the warning in the form of <code>package-name.specific-warning</code>.</li>\n        </ul>\n      <li> <code>next</code> - A function that calls into the previously registered handler.</li>\n    </ul>\n\n    @public\n    @static\n    @method registerWarnHandler\n    @for @ember/debug\n    @param handler {Function} A function to handle warnings.\n    @since 2.1.0\n  */\n  registerHandler = function registerHandler(handler) {\n    genericRegisterHandler('warn', handler);\n  };\n\n  registerHandler(function logWarning(message) {\n    /* eslint-disable no-console */\n    console.warn(`WARNING: ${message}`);\n    /* eslint-enable no-console */\n  });\n\n  missingOptionsDeprecation =\n    'When calling `warn` you ' +\n    'must provide an `options` hash as the third parameter.  ' +\n    '`options` should include an `id` property.';\n  missingOptionsIdDeprecation = 'When calling `warn` you must provide `id` in options.';\n\n  /**\n    Display a warning with the provided message.\n\n    * In a production build, this method is defined as an empty function (NOP).\n    Uses of this method in Ember itself are stripped from the ember.prod.js build.\n\n    ```javascript\n    import { warn } from '@ember/debug';\n    import tomsterCount from './tomster-counter'; // a module in my project","sourceCodeStart":48,"sourceCodeEnd":84,"githubUrl":"https://github.com/emberjs/ember.js/blob/26f97246a8bf2e28edf26ac3093da2e86c04ffc5/packages/@ember/debug/lib/warn.ts#L48-L84","documentation":"Error \"WARNING: ${message}\" thrown in emberjs/ember.js.","triggerScenarios":"Thrown at packages/@ember/debug/lib/warn.ts:66 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"26f97246a8bf2e28edf26ac3093da2e86c04ffc5","analyzedAt":"2026-09-01T05:01:28.182Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}