* Displays error message. * * @param {string} component Component which logs the message. * @param {string} message Message to display. * @param {ReadonlyArray } optionalParams Optional data related to a message. * * @returns {void} Nothing.
(component: string, message: string, ...optionalParams: ReadonlyArray<any>)
| 224 | * @returns {void} Nothing. |
| 225 | */ |
| 226 | public error(component: string, message: string, ...optionalParams: ReadonlyArray<any>): void |
| 227 | { |
| 228 | if (this.errorDisabled) |
| 229 | { |
| 230 | return; |
| 231 | } |
| 232 | |
| 233 | if (this.supportsConsoleError) |
| 234 | { |
| 235 | const errorMessage = this.format(component, 'Error', message); |
| 236 | |
| 237 | console.error(errorMessage, ...optionalParams); |
| 238 | |
| 239 | return; |
| 240 | } |
| 241 | |
| 242 | if (this.supportsConsoleLog) |
| 243 | { |
| 244 | const errorMessage = this.format(component, 'Error', message); |
| 245 | |
| 246 | console.log(errorMessage, ...optionalParams); |
| 247 | |
| 248 | return; |
| 249 | } |
| 250 | |
| 251 | return; |
| 252 | } |
| 253 | } |
no test coverage detected