summaryrefslogtreecommitdiff
path: root/lib/dojo/errors
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2013-03-18 10:26:24 +0400
committerAndrew Dolgov <[email protected]>2013-03-18 10:26:26 +0400
commitf0cfe83e3725f9a3928da97a6e3085e79cb25309 (patch)
tree4b0af188defaa807c7bc6ff3a101b41c9166c463 /lib/dojo/errors
parent9a2885da170ffd64358b99194095851a2d09c1b6 (diff)
upgrade dojo to 1.8.3 (refs #570)
Diffstat (limited to 'lib/dojo/errors')
-rw-r--r--lib/dojo/errors/CancelError.js8
-rw-r--r--lib/dojo/errors/CancelError.js.uncompressed.js13
-rw-r--r--lib/dojo/errors/RequestError.js8
-rw-r--r--lib/dojo/errors/RequestError.js.uncompressed.js15
-rw-r--r--lib/dojo/errors/RequestTimeoutError.js8
-rw-r--r--lib/dojo/errors/RequestTimeoutError.js.uncompressed.js15
-rw-r--r--lib/dojo/errors/create.js8
-rw-r--r--lib/dojo/errors/create.js.uncompressed.js41
8 files changed, 116 insertions, 0 deletions
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;
+ };
+});