|
[node.js] [node-postgres] как работает console.log, как разобрать ошибку?
|
|||
---|---|---|---|
#18+
почему-то, когда делаю JSON.stringify, там нет описательной части ошибки, а когда вывожу console.log(err) - есть видимо, err - какой-то необычный объект? Код: javascript 1. 2. 3. 4. 5.
выводит в консоль: Код: plaintext 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13.
а в браузер: {"length":86,"name":"error","severity":"ERROR","code":"42601","position":"62","file":"scan.l","line":"1001","routine":"scanner_yyerror"} почему так? как достать описание ошибки словами? http://nodejs.ru/doc/v0.4.x/stdio.html#console.log https://github.com/brianc/node-postgres/wiki/Error-handling (оригинал вопроса, как обычно: http://stackoverflow.com/questions/15112862/what-kind-of-object-is-node-postgres-error-why-nodes-console-log-and-json-stri) ... |
|||
:
Нравится:
Не нравится:
|
|||
27.02.2013, 17:14 |
|
[node.js] [node-postgres] как работает console.log, как разобрать ошибку?
|
|||
---|---|---|---|
#18+
аувв, а что показывает err.toString() ? ... |
|||
:
Нравится:
Не нравится:
|
|||
27.02.2013, 17:22 |
|
[node.js] [node-postgres] как работает console.log, как разобрать ошибку?
|
|||
---|---|---|---|
#18+
Яростный Мечаувв, а что показывает err.toString() ? error: syntax error at or near "step" то есть, вроде бы то, что надо! хе-хе. но странно как-то! спасибо ... |
|||
:
Нравится:
Не нравится:
|
|||
27.02.2013, 17:28 |
|
[node.js] [node-postgres] как работает console.log, как разобрать ошибку?
|
|||
---|---|---|---|
#18+
ауввerror: syntax error at or near "step"ну или "error: column "undefined" does not exist" Модератор: Тема перенесена из форума "HTML, JavaScript, VBScript, CSS". ... |
|||
:
Нравится:
Не нравится:
|
|||
27.02.2013, 17:29 |
|
|
start [/forum/topic.php?fid=24&fpage=4&tid=1480870]: |
0ms |
get settings: |
10ms |
get forum list: |
14ms |
check forum access: |
2ms |
check topic access: |
2ms |
track hit: |
59ms |
get topic data: |
11ms |
get forum data: |
4ms |
get page messages: |
45ms |
get tp. blocked users: |
2ms |
others: | 249ms |
total: | 398ms |
0 / 0 |