"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/minErr.js" between
angular.js-1.7.9.tar.gz and angular.js-1.8.0.tar.gz

About: AngularJS is a web application framework that assists with creating single-page applications that only require HTML, CSS, and JavaScript on the client side.

minErr.js  (angular.js-1.7.9):minErr.js  (angular.js-1.8.0)
skipping to change at line 35 skipping to change at line 35
* *
* Omitted or undefined options will leave the corresponding configuration value s unchanged. * Omitted or undefined options will leave the corresponding configuration value s unchanged.
* *
* @param {Object=} config - The configuration object. May only contain the opti ons that need to be * @param {Object=} config - The configuration object. May only contain the opti ons that need to be
* updated. Supported keys: * updated. Supported keys:
* *
* * `objectMaxDepth` **{Number}** - The max depth for stringifying objects. Se tting to a * * `objectMaxDepth` **{Number}** - The max depth for stringifying objects. Se tting to a
* non-positive or non-numeric value, removes the max depth limit. * non-positive or non-numeric value, removes the max depth limit.
* Default: 5 * Default: 5
* *
* * `urlErrorParamsEnabled` **{Boolean}** - Specifies wether the generated err or url will * * `urlErrorParamsEnabled` **{Boolean}** - Specifies whether the generated er ror url will
* contain the parameters of the thrown error. Disabling the parameters can be useful if the * contain the parameters of the thrown error. Disabling the parameters can be useful if the
* generated error url is very long. * generated error url is very long.
* *
* Default: true. When used without argument, it returns the current value. * Default: true. When used without argument, it returns the current value.
*/ */
function errorHandlingConfig(config) { function errorHandlingConfig(config) {
if (isObject(config)) { if (isObject(config)) {
if (isDefined(config.objectMaxDepth)) { if (isDefined(config.objectMaxDepth)) {
minErrConfig.objectMaxDepth = isValidObjectMaxDepth(config.objectMaxDepth) ? config.objectMaxDepth : NaN; minErrConfig.objectMaxDepth = isValidObjectMaxDepth(config.objectMaxDepth) ? config.objectMaxDepth : NaN;
} }
skipping to change at line 84 skipping to change at line 84
* resulting error will replace {0} with the value of foo, and {1} with the * resulting error will replace {0} with the value of foo, and {1} with the
* value of bar. The object is not restricted in the number of arguments it can * value of bar. The object is not restricted in the number of arguments it can
* take. * take.
* *
* If fewer arguments are specified than necessary for interpolation, the extra * If fewer arguments are specified than necessary for interpolation, the extra
* interpolation markers will be preserved in the final string. * interpolation markers will be preserved in the final string.
* *
* Since data will be parsed statically during a build step, some restrictions * Since data will be parsed statically during a build step, some restrictions
* are applied with respect to how minErr instances are created and called. * are applied with respect to how minErr instances are created and called.
* Instances should have names of the form namespaceMinErr for a minErr created * Instances should have names of the form namespaceMinErr for a minErr created
* using minErr('namespace') . Error codes, namespaces and template strings * using minErr('namespace'). Error codes, namespaces and template strings
* should all be static strings, not variables or general expressions. * should all be static strings, not variables or general expressions.
* *
* @param {string} module The namespace to use for the new minErr instance. * @param {string} module The namespace to use for the new minErr instance.
* @param {function} ErrorConstructor Custom error constructor to be instantiate d when returning * @param {function} ErrorConstructor Custom error constructor to be instantiate d when returning
* error from returned function, for cases when a particular type of error is useful. * error from returned function, for cases when a particular type of error is useful.
* @returns {function(code:string, template:string, ...templateArgs): Error} min Err instance * @returns {function(code:string, template:string, ...templateArgs): Error} min Err instance
*/ */
function minErr(module, ErrorConstructor) { function minErr(module, ErrorConstructor) {
ErrorConstructor = ErrorConstructor || Error; ErrorConstructor = ErrorConstructor || Error;
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)