MCPcopy Create free account
hub / github.com/dipscope/TypeManager.TS / error

Method error

src/logger.ts:226–252  ·  view source on GitHub ↗

* 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>)

Source from the content-addressed store, hash-verified

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}

Callers 15

serializeMethod · 0.80
deserializeMethod · 0.80
serializeMethod · 0.80
deserializeMethod · 0.80
serializeMethod · 0.80
deserializeMethod · 0.80
serializeMethod · 0.80
deserializeMethod · 0.80
serializeMethod · 0.80
deserializeMethod · 0.80
serializeMethod · 0.80

Calls 1

formatMethod · 0.95

Tested by

no test coverage detected