Simon Lydell 4bbd63c883 Make patched stack traces’ prelude consistent with V8
In V8, the `stack` property of errors contains a prelude and then the
stack trace. The contents of the prelude depends on whether the error
has a message or not.

If the error has _not_ got a message, the prelude contains the name of the
error and a newline.

If the error _has_ got a message, the prelude contains the name of the
error, a colon, a space, the message and a newline.

In other words, the prelude consists of `error.toString() + "\n"`

Before, coffee-script’s patched stack traces worked exactly like that,
except that it _always_ added a colon and a space after the name of the
error.

This fix is important because it allows for easy and consistent
consumption of the stack trace only:

`stack = error.stack[error.toString().length..]`
2014-02-07 13:01:01 +01:00
2014-01-29 23:19:36 -06:00
2012-09-25 17:50:04 -05:00
2011-10-31 22:54:32 -04:00
2014-01-28 14:05:38 -05:00
2014-01-28 14:05:38 -05:00

            {
         }   }   {
        {   {  }  }
         }   }{  {
        {  }{  }  }                    _____       __  __
       { }{ }{  { }                   / ____|     / _|/ _|
     .- { { }  { }} -.               | |     ___ | |_| |_ ___  ___
    (  { } { } { } }  )              | |    / _ \|  _|  _/ _ \/ _ \
    |`-..________ ..-'|              | |___| (_) | | | ||  __/  __/
    |                 |               \_____\___/|_| |_| \___|\___|
    |                 ;--.
    |                (__  \            _____           _       _
    |                 | )  )          / ____|         (_)     | |
    |                 |/  /          | (___   ___ _ __ _ _ __ | |_
    |                 (  /            \___ \ / __| '__| | '_ \| __|
    |                 |/              ____) | (__| |  | | |_) | |_
    |                 |              |_____/ \___|_|  |_| .__/ \__|
     `-.._________..-'                                  | |
                                                        |_|


  CoffeeScript is a little language that compiles into JavaScript.

  If you have the Node Package Manager installed:
  npm install -g coffee-script
  (Leave off the -g if you don't wish to install globally.)

  Or, if you don't wish to use npm:
  sudo bin/cake install

  Execute a script:
  coffee /path/to/script.coffee

  Compile a script:
  coffee -c /path/to/script.coffee

  For documentation, usage, and examples, see:
  http://coffeescript.org/

  To suggest a feature, report a bug, or general discussion:
  http://github.com/jashkenas/coffee-script/issues/

  If you'd like to chat, drop by #coffeescript on Freenode IRC,
  or on webchat.freenode.net.

  The source repository:
  git://github.com/jashkenas/coffee-script.git

  Top 100 contributors are listed here:
  http://github.com/jashkenas/coffee-script/contributors
Description
No description provided
Readme MIT 47 MiB
Languages
CoffeeScript 64.6%
JavaScript 35.4%