From f0cfe83e3725f9a3928da97a6e3085e79cb25309 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 18 Mar 2013 10:26:24 +0400 Subject: upgrade dojo to 1.8.3 (refs #570) --- lib/dojo/errors/CancelError.js | 8 +++++ lib/dojo/errors/CancelError.js.uncompressed.js | 13 +++++++ lib/dojo/errors/RequestError.js | 8 +++++ lib/dojo/errors/RequestError.js.uncompressed.js | 15 ++++++++ lib/dojo/errors/RequestTimeoutError.js | 8 +++++ .../errors/RequestTimeoutError.js.uncompressed.js | 15 ++++++++ lib/dojo/errors/create.js | 8 +++++ lib/dojo/errors/create.js.uncompressed.js | 41 ++++++++++++++++++++++ 8 files changed, 116 insertions(+) create mode 100644 lib/dojo/errors/CancelError.js create mode 100644 lib/dojo/errors/CancelError.js.uncompressed.js create mode 100644 lib/dojo/errors/RequestError.js create mode 100644 lib/dojo/errors/RequestError.js.uncompressed.js create mode 100644 lib/dojo/errors/RequestTimeoutError.js create mode 100644 lib/dojo/errors/RequestTimeoutError.js.uncompressed.js create mode 100644 lib/dojo/errors/create.js create mode 100644 lib/dojo/errors/create.js.uncompressed.js (limited to 'lib/dojo/errors') diff --git a/lib/dojo/errors/CancelError.js b/lib/dojo/errors/CancelError.js new file mode 100644 index 000000000..5d6f9e653 --- /dev/null +++ b/lib/dojo/errors/CancelError.js @@ -0,0 +1,8 @@ +/* + Copyright (c) 2004-2012, The Dojo Foundation All Rights Reserved. + Available via Academic Free License >= 2.1 OR the modified BSD license. + see: http://dojotoolkit.org/license for details +*/ + +//>>built +define("dojo/errors/CancelError",["./create"],function(_1){return _1("CancelError",null,null,{dojoType:"cancel"});}); \ No newline at end of file diff --git a/lib/dojo/errors/CancelError.js.uncompressed.js b/lib/dojo/errors/CancelError.js.uncompressed.js new file mode 100644 index 000000000..2d96b0521 --- /dev/null +++ b/lib/dojo/errors/CancelError.js.uncompressed.js @@ -0,0 +1,13 @@ +define("dojo/errors/CancelError", ["./create"], function(create){ + // module: + // dojo/errors/CancelError + + /*===== + return function(){ + // summary: + // Default error if a promise is canceled without a reason. + }; + =====*/ + + return create("CancelError", null, null, { dojoType: "cancel" }); +}); diff --git a/lib/dojo/errors/RequestError.js b/lib/dojo/errors/RequestError.js new file mode 100644 index 000000000..2773cd77f --- /dev/null +++ b/lib/dojo/errors/RequestError.js @@ -0,0 +1,8 @@ +/* + Copyright (c) 2004-2012, The Dojo Foundation All Rights Reserved. + Available via Academic Free License >= 2.1 OR the modified BSD license. + see: http://dojotoolkit.org/license for details +*/ + +//>>built +define("dojo/errors/RequestError",["./create"],function(_1){return _1("RequestError",function(_2,_3){this.response=_3;});}); \ No newline at end of file diff --git a/lib/dojo/errors/RequestError.js.uncompressed.js b/lib/dojo/errors/RequestError.js.uncompressed.js new file mode 100644 index 000000000..f476cd822 --- /dev/null +++ b/lib/dojo/errors/RequestError.js.uncompressed.js @@ -0,0 +1,15 @@ +define("dojo/errors/RequestError", ['./create'], function(create){ + // module: + // dojo/errors/RequestError + + /*===== + return function(){ + // summary: + // TODOC + }; + =====*/ + + return create("RequestError", function(message, response){ + this.response = response; + }); +}); diff --git a/lib/dojo/errors/RequestTimeoutError.js b/lib/dojo/errors/RequestTimeoutError.js new file mode 100644 index 000000000..a9fed0154 --- /dev/null +++ b/lib/dojo/errors/RequestTimeoutError.js @@ -0,0 +1,8 @@ +/* + Copyright (c) 2004-2012, The Dojo Foundation All Rights Reserved. + Available via Academic Free License >= 2.1 OR the modified BSD license. + see: http://dojotoolkit.org/license for details +*/ + +//>>built +define("dojo/errors/RequestTimeoutError",["./create","./RequestError"],function(_1,_2){return _1("RequestTimeoutError",null,_2,{dojoType:"timeout"});}); \ No newline at end of file diff --git a/lib/dojo/errors/RequestTimeoutError.js.uncompressed.js b/lib/dojo/errors/RequestTimeoutError.js.uncompressed.js new file mode 100644 index 000000000..91e986a39 --- /dev/null +++ b/lib/dojo/errors/RequestTimeoutError.js.uncompressed.js @@ -0,0 +1,15 @@ +define("dojo/errors/RequestTimeoutError", ['./create', './RequestError'], function(create, RequestError){ + // module: + // dojo/errors/RequestTimeoutError + + /*===== + return function(){ + // summary: + // TODOC + }; + =====*/ + + return create("RequestTimeoutError", null, RequestError, { + dojoType: "timeout" + }); +}); diff --git a/lib/dojo/errors/create.js b/lib/dojo/errors/create.js new file mode 100644 index 000000000..e4bb45659 --- /dev/null +++ b/lib/dojo/errors/create.js @@ -0,0 +1,8 @@ +/* + Copyright (c) 2004-2012, The Dojo Foundation All Rights Reserved. + Available via Academic Free License >= 2.1 OR the modified BSD license. + see: http://dojotoolkit.org/license for details +*/ + +//>>built +define("dojo/errors/create",["../_base/lang"],function(_1){return function(_2,_3,_4,_5){_4=_4||Error;var _6=function(_7){if(_4===Error){if(Error.captureStackTrace){Error.captureStackTrace(this,_6);}var _8=Error.call(this,_7),_9;for(_9 in _8){if(_8.hasOwnProperty(_9)){this[_9]=_8[_9];}}this.message=_7;this.stack=_8.stack;}else{_4.apply(this,arguments);}if(_3){_3.apply(this,arguments);}};_6.prototype=_1.delegate(_4.prototype,_5);_6.prototype.name=_2;_6.prototype.constructor=_6;return _6;};}); \ No newline at end of file diff --git a/lib/dojo/errors/create.js.uncompressed.js b/lib/dojo/errors/create.js.uncompressed.js new file mode 100644 index 000000000..d303a6a77 --- /dev/null +++ b/lib/dojo/errors/create.js.uncompressed.js @@ -0,0 +1,41 @@ +define("dojo/errors/create", ["../_base/lang"], function(lang){ + return function(name, ctor, base, props){ + base = base || Error; + + var ErrorCtor = function(message){ + if(base === Error){ + if(Error.captureStackTrace){ + Error.captureStackTrace(this, ErrorCtor); + } + + // Error.call() operates on the returned error + // object rather than operating on |this| + var err = Error.call(this, message), + prop; + + // Copy own properties from err to |this| + for(prop in err){ + if(err.hasOwnProperty(prop)){ + this[prop] = err[prop]; + } + } + + // messsage is non-enumerable in ES5 + this.message = message; + // stack is non-enumerable in at least Firefox + this.stack = err.stack; + }else{ + base.apply(this, arguments); + } + if(ctor){ + ctor.apply(this, arguments); + } + }; + + ErrorCtor.prototype = lang.delegate(base.prototype, props); + ErrorCtor.prototype.name = name; + ErrorCtor.prototype.constructor = ErrorCtor; + + return ErrorCtor; + }; +}); -- cgit v1.2.3