On 05/09/14 13:17, Ingwie Phoenix wrote:

In either case, I get the base idea of it. But what I dont get, is any
information on the structure of an Error object.

This is a V8 object, and it contains -to the best of my knowledge:
- name (type of error);
- message (the string you pass to the constructor);
- stack (the stack trace).

Like in:
> var error = new Error("My error message");
> error.name
'Error'
> error.message
'My error message'
> error.stack
'Error: My error message\n at repl:1:13\n at REPLServer.self.eval (repl.js:110:21)\n at repl.js:249:20\n at REPLServer.self.eval (repl.js:122:7)\n at Interface.<anonymous> (repl.js:239:12)\n at Interface.EventEmitter.emit (events.js:95:17)\n at Interface._onLine (readline.js:202:10)\n at Interface._line (readline.js:531:8)\n at Interface._ttyWrite (readline.js:760:14)\n at ReadStream.onkeypress (readline.js:99:10)'

Of course, once created, you can add more properties to it to fit your case.

Regards,

Luca Morandini
Data Architect - AURIN project
Melbourne eResearch Group
Department of Computing and Information Systems
University of Melbourne
Tel. +61 03 903 58 380
Skype: lmorandini

--
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
--- You received this message because you are subscribed to the Google Groups "nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/ludplo%24m52%241%40ger.gmane.org.
For more options, visit https://groups.google.com/d/optout.

Reply via email to