Comparing version 1.0.0 to 1.0.1
@@ -5,3 +5,3 @@ { | ||
"homepage": "https://github.com/Kikobeats/whoops", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"main": "./dist/whoops.js", | ||
@@ -8,0 +8,0 @@ "authors": [ |
@@ -0,1 +1,13 @@ | ||
<a name="1.0.1"></a> | ||
## 1.0.1 (2015-11-23) | ||
* Fix typos in README.md ([e9063f2](https://github.com/kikobeats/whoops/commit/e9063f2)) | ||
* Merge branch 'master' of github.com:kikobeats/whoops ([a363134](https://github.com/kikobeats/whoops/commit/a363134)) | ||
* Merge pull request #4 from jorrit/patch-1 ([d9156f6](https://github.com/kikobeats/whoops/commit/d9156f6)) | ||
* rewrite to avoid new ([23e586b](https://github.com/kikobeats/whoops/commit/23e586b)) | ||
* update to upgrade bower.json ([b18589d](https://github.com/kikobeats/whoops/commit/b18589d)) | ||
<a name="1.0.0"></a> | ||
@@ -5,2 +17,3 @@ # 1.0.0 (2015-11-20) | ||
* 1.0.0 releases ([447ae1e](https://github.com/kikobeats/whoops/commit/447ae1e)) | ||
* refactored and renamed ([cf2b458](https://github.com/kikobeats/whoops/commit/cf2b458)) | ||
@@ -23,5 +36,5 @@ * removed extra spaces ([931245d](https://github.com/kikobeats/whoops/commit/931245d)) | ||
* Added format for string constructor ([d584188](https://github.com/kikobeats/whoops/commit/d584188)) | ||
* Update package.json ([1120535](https://github.com/kikobeats/whoops/commit/1120535)) | ||
* improve example ([aa2d318](https://github.com/kikobeats/whoops/commit/aa2d318)) | ||
* little suite of tests 😁 ([5e11def](https://github.com/kikobeats/whoops/commit/5e11def)) | ||
* Update package.json ([1120535](https://github.com/kikobeats/whoops/commit/1120535)) | ||
* updated ([d5fc2d9](https://github.com/kikobeats/whoops/commit/d5fc2d9)) | ||
@@ -67,7 +80,7 @@ | ||
* 0.1.0 releases ([594c110](https://github.com/kikobeats/whoops/commit/594c110)) | ||
* Update README.md ([e7172ab](https://github.com/kikobeats/whoops/commit/e7172ab)) | ||
* added documentation and more examples ([3e68abb](https://github.com/kikobeats/whoops/commit/3e68abb)) | ||
* first approach ([c52341b](https://github.com/kikobeats/whoops/commit/c52341b)) | ||
* Update README.md ([e7172ab](https://github.com/kikobeats/whoops/commit/e7172ab)) | ||
/** | ||
* whoops - Simplification of Error Constructor. | ||
* @version v1.0.0 | ||
* @version v1.0.1 | ||
* @link https://github.com/Kikobeats/whoops | ||
* @license MIT | ||
*/require=function e(r,t,o){function n(i,u){if(!t[i]){if(!r[i]){var c="function"==typeof require&&require;if(!u&&c)return c(i,!0);if(s)return s(i,!0);var f=new Error("Cannot find module '"+i+"'");throw f.code="MODULE_NOT_FOUND",f}var a=t[i]={exports:{}};r[i][0].call(a.exports,function(e){var t=r[i][1][e];return n(t?t:e)},a,a.exports,e,r,t,o)}return t[i].exports}for(var s="function"==typeof require&&require,i=0;i<o.length;i++)n(o[i]);return n}({1:[function(e,r,t){"use strict";var o;r.exports=o=function(){function e(e){var r;return r=new Error,"object"==typeof e?this._composeMessageFromObject(r,e):this._composeMessageFromString(r,arguments)}return e.prototype._composeMessageFromObject=function(e,r){var t,o;for(t in r)o=r[t],e[t]=o;return e.code&&(e.message=e.code+", "+e.message),e},e.prototype._composeMessageFromString=function(e,r){var t;return t={3:function(){return e.name=r[0],e.code=r[1],e.message=e.code+", "+r[2]},2:function(){return e.name=r[0],e.message=r[1]},1:function(){return e.message=r[0]},0:function(){}},t[r.length](),e},e}()},{}],2:[function(e,r,t){},{}],whoops:[function(e,r,t){"use strict";e("coffee-script/register"),r.exports=e("./lib")},{"./lib":1,"coffee-script/register":2}]},{},[]); | ||
*/require=function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var s=new Error("Cannot find module '"+i+"'");throw s.code="MODULE_NOT_FOUND",s}var a=n[i]={exports:{}};e[i][0].call(a.exports,function(r){var n=e[i][1][r];return o(n?n:r)},a,a.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}({1:[function(r,e,n){"use strict";var t,o;t=function(r,e){var n,t;for(n in e)t=e[n],r[n]=t;return r.code&&(r.message=r.code+", "+r.message),r},o=function(r,e){var n;return n={3:function(){return r.name=e[0],r.code=e[1],r.message=r.code+", "+e[2]},2:function(){return r.name=e[0],r.message=e[1]},1:function(){return r.message=e[0]},0:function(){}},n[e.length](),r},e.exports=function(r){var e;return e=Error(),"object"==typeof r?t(e,r):o(e,arguments)}},{}],2:[function(r,e,n){},{}],whoops:[function(r,e,n){"use strict";r("coffee-script/register"),e.exports=r("./lib")},{"./lib":1,"coffee-script/register":2}]},{},[]); |
@@ -5,3 +5,3 @@ { | ||
"homepage": "https://github.com/Kikobeats/whoops", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"main": "./index.js", | ||
@@ -8,0 +8,0 @@ "author": { |
@@ -21,3 +21,3 @@ # Whoops | ||
```js | ||
var error = new Error('ENOFILE, Something is wrong'); | ||
var error = Error('ENOFILE, Something is wrong'); | ||
error.name = 'DAMNError'; | ||
@@ -34,3 +34,3 @@ error.code = 'ENOFILE'; | ||
var Whoops = require('Whoops'); | ||
var error = new Whoops('DAMError', 'ENOFILE', 'Something is wrong'); | ||
var error = Whoops('DAMError', 'ENOFILE', 'Something is wrong'); | ||
@@ -44,3 +44,3 @@ console.log(error.name) // => 'DAMNError: ENOFILE, Something is wrong' | ||
```js | ||
var error = new Whoops({ | ||
var error = Whoops({ | ||
name: 'DAMError', , '' | ||
@@ -88,6 +88,6 @@ code: 'ENOFILE' | ||
```js | ||
throw new Whoops('JSONError', 'The format of the JSON is invalid'); | ||
throw Whoops('JSONError', 'The format of the JSON is invalid'); | ||
JSONError: The format of the JSON is invalid | ||
at new Whoops (/Users/josefranciscoverdugambin/Projects/whoops/lib/Whoops.coffee:6:17) | ||
at Whoops (/Users/josefranciscoverdugambin/Projects/whoops/lib/Whoops.coffee:6:17) | ||
at Object.<anonymous> (/Users/josefranciscoverdugambin/Projects/whoops/example.js:3:7) | ||
@@ -106,6 +106,6 @@ at Module._compile (module.js:456:26) | ||
```js | ||
throw new Whoops('JSONError', 'NotValidJSON', 'The format of the JSON is invalid'); | ||
throw Whoops('JSONError', 'NotValidJSON', 'The format of the JSON is invalid'); | ||
JSONError: NotValidJSON, The format of the JSON is invalid | ||
at new Whoops (/Users/josefranciscoverdugambin/Projects/whoops/lib/Whoops.coffee:6:17) | ||
at Whoops (/Users/josefranciscoverdugambin/Projects/whoops/lib/Whoops.coffee:6:17) | ||
at Object.<anonymous> (/Users/josefranciscoverdugambin/Projects/whoops/example.js:3:7) | ||
@@ -124,3 +124,3 @@ at Module._compile (module.js:456:26) | ||
```js | ||
throw new Whoops({ | ||
throw Whoops({ | ||
name: 'JSONError', | ||
@@ -142,3 +142,3 @@ code: 'NotValidJSON', | ||
It's correct returns a object in a callback to express a unexpected behavior, but the object doesn't have a type and definetly doesn't follow a error interface: | ||
It's correct to return an object in a callback to express unexpected behavior, but the object doesn't have a type and definitely doesn't follow a error interface: | ||
@@ -148,3 +148,3 @@ ```js | ||
callback({message: 'LOL something was wrong' } // poor, but better | ||
callback(new Whoops('LOL, something was wrong') // BEST! | ||
callback(Whoops('LOL, something was wrong') // BEST! | ||
``` | ||
@@ -151,0 +151,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
23153