Commits

Stephen McKamey committed 6321725

- fixing return type

Comments (0)

Files changed (3)

 				return new Result(result);
 			} catch (ex) {
 				// handle error with context
-				return onError(ex);
+				return new Result(onError(ex));
 			}
 		};
 

build/duel.min.js

 (function(t){function u(a){this.value=a}function j(a){switch(typeof a){case "object":return!a?0:a instanceof Array?2:a instanceof u?5:3;case "function":return 1;case "undefined":return 0;default:return 4}}function n(a){return typeof a==="function"}function q(a){if(j(a)!==2)a=["",a];this.value=a}function r(a,b){if(j(a)===2)switch(j(b)){case 2:if(b[0]==="")for(var d=1,c=b.length;d<c;d++)r(a,b[d]);else a.push(b);break;case 3:d=a[1];if(j(d)===3)for(c in b){if(b.hasOwnProperty(c))d[c]=b[c]}else a.splice(1,
-0,b);break;case 4:d=a.length-1;if(d>0&&j(a[d])===4)a[d]=""+a[d]+b;else a.push(""+b);break;case 0:break;default:a.push(b)}}function v(a,b,d,c){for(var e=1,f=a.length;e<f;e++){var g=a[e],m=g[1]&&g[1].test;switch(g[0]){case "$if":if(n(m))m=m(b,d,c);if(!m)continue;if(g.length===3)g=g[2];else[""].concat(a.slice(2));return i(g,b,d,c);case "$else":if(g.length===2)g=g[1];else[""].concat(a.slice(1));return i(g,b,d,c)}}return null}function D(a){if(j(a)!==2)a=["",a];var b=function(d){try{var c=i(a,d,0,1);return new q(c)}catch(e){return"["+
-e+"]"}};b.getView=function(){return a};return b}function k(){this.value=k.FAST?"":[]}function E(a){if(typeof a!=="string")return a;return a.replace(/[&<>]/g,function(b){switch(b){case "&":return"&amp;";case "<":return"&lt;";case ">":return"&gt;";default:return b}})}function F(a){if(typeof a!=="string")return a;return a.replace(/[&<>"]/g,function(b){switch(b){case "&":return"&amp;";case "<":return"&lt;";case ">":return"&gt;";case '"':return"&quot;";default:return b}})}function w(a,b){var d=b[0],c=
+0,b);break;case 4:d=a.length-1;if(d>0&&j(a[d])===4)a[d]=""+a[d]+b;else a.push(""+b);break;case 0:break;default:a.push(b)}}function v(a,b,d,c){for(var e=1,f=a.length;e<f;e++){var g=a[e],m=g[1]&&g[1].test;switch(g[0]){case "$if":if(n(m))m=m(b,d,c);if(!m)continue;if(g.length===3)g=g[2];else[""].concat(a.slice(2));return i(g,b,d,c);case "$else":if(g.length===2)g=g[1];else[""].concat(a.slice(1));return i(g,b,d,c)}}return null}function D(a){if(j(a)!==2)a=["",a];var b=function(d){try{var c=i(a,d,0,1);return new q(c)}catch(e){return new q("["+
+e+"]")}};b.getView=function(){return a};return b}function k(){this.value=k.FAST?"":[]}function E(a){if(typeof a!=="string")return a;return a.replace(/[&<>]/g,function(b){switch(b){case "&":return"&amp;";case "<":return"&lt;";case ">":return"&gt;";default:return b}})}function F(a){if(typeof a!=="string")return a;return a.replace(/[&<>"]/g,function(b){switch(b){case "&":return"&amp;";case "<":return"&lt;";case ">":return"&gt;";case '"':return"&quot;";default:return b}})}function w(a,b){var d=b[0],c=
 b.length,e=1,f;if(d){a.append("<",d);f=b[e];if(j(f)===3){for(var g in f)if(f.hasOwnProperty(g)){a.append(" ",g);var m=f[g];m&&a.append('="',F(m),'"')}e++}a.append(">")}for(;e<c;e++){f=b[e];j(f)===2?w(a,f):a.append(E(f))}d&&!G[d]&&a.append("</",d,">")}function o(a){if(!a){if(l.createDocumentFragment)return l.createDocumentFragment();a=""}if(a.toLowerCase()==="style"&&l.createStyleSheet)return l.createStyleSheet();return l.createElement(a)}function s(a,b){if(b)if(a.tagName&&a.tagName.toLowerCase()===
 "table"&&a.tBodies)if(b.tagName){var d=b.tagName.toLowerCase();if(d&&d!=="tbody"&&d!=="thead"){var c=a.tBodies.length>0?a.tBodies[a.tBodies.length-1]:null;if(!c){c=o(d==="th"?"thead":"tbody");a.appendChild(c)}c.appendChild(b)}else a.canHaveChildren!==false&&a.appendChild(b)}else{if(b.nodeType===11)for(;b.firstChild;)s(a,b.removeChild(b.firstChild))}else if(a.tagName&&a.tagName.toLowerCase()==="style"&&l.createStyleSheet)a.cssText=b;else if(a.canHaveChildren!==false)a.appendChild(b);else if(a.tagName&&
 a.tagName.toLowerCase()==="object"&&b.tagName&&b.tagName.toLowerCase()==="param"){try{a.appendChild(b)}catch(e){}try{if(a.object)a.object[b.name]=b.value}catch(f){}}}function x(a,b,d){if(typeof d==="string")d=new Function("event",d);if(n(d))a[b]=d}function y(a){return!!a&&a.nodeType===3&&(!a.nodeValue||!/\S/.exec(a.nodeValue))}function z(a){if(a){for(;y(a.firstChild);)a.removeChild(a.firstChild);for(;y(a.lastChild);)a.removeChild(a.lastChild)}}function A(a,b){var d=a[b];if(d){try{delete a[b]}catch(c){a[b]=

src/js/factory.js

 				return new Result(result);
 			} catch (ex) {
 				// handle error with context
-				return onError(ex);
+				return new Result(onError(ex));
 			}
 		};