CartoDB/cartodb.js — pull request #245 by Xatpy (2014-12-11 16:51:23+00:00)
Title: Cdb 118 bug named map instanciation errors

PR about bug https://github.com/CartoDB/cartodb.js/issues/118

As we were talking, the error should be thrown by "layer level", and not in the instantiation.
So, and example should be:
`layer.on('error', function(e) {
console.log(e);
})`
and not ~~`createLayer({ type: 'namedmap' }).on('error', function() {
})`~~

Please, @javisantana @xavijam , could your review it??

Specially, the [line](https://github.com/CartoDB/cartodb.js/commit/9f8100b1d0cc10fa713c80679c13283254204510#diff-79bdd8304243742c66c74e43abfdf642R467). I think that it will not generate more problems because all tests passed, but I wanna be sure. Also, about the comment code styling [here](https://github.com/CartoDB/cartodb.js/commit/9f8100b1d0cc10fa713c80679c13283254204510#diff-79bdd8304243742c66c74e43abfdf642R464).