How to use the error function from util

Find comprehensive JavaScript util.error code examples handpicked from public code repositorys.

385
386
387
388
389
390
391
392
393
394
require('util').log('Timestamped message.');
```


<div id="error" class="anchor"></div>
## util.error([...])

> 稳定度:0 - 已废弃:使用 [console.error()](../console/class_Console.md#consoleerrordata-args) 代替。

`console.error` 的过时前身。
fork icon21
star icon99
watch icon2

231
232
233
234
235
236
237
238
239
240

* `string` {string} The message to print to `stderr`

Deprecated predecessor of `console.error`.

### util.error([...strings])
<!-- YAML
added: v0.3.0
deprecated: v0.11.3
-->
fork icon0
star icon6
watch icon1