Skip to content

Commit

Permalink
4.5.2 JDoc bug fixing
Browse files Browse the repository at this point in the history
  • Loading branch information
hklages committed Nov 21, 2020
1 parent 00c76bb commit a6c5b3c
Show file tree
Hide file tree
Showing 14 changed files with 173 additions and 87 deletions.
48 changes: 27 additions & 21 deletions docs/Helper.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ <h1 class="page-title">Source: Helper.js</h1>
<pre class="prettyprint source linenums"><code>'use strict'

/**
* Collection of general purpose functions not being related to SOAP or SONOS.
* Collection of general purpose REGEX strings and methods not being related to SOAP or SONOS.
*
* @module Helpers
*
Expand Down Expand Up @@ -137,25 +137,26 @@ <h1 class="page-title">Source: Helper.js</h1>
* @param {object} msg current msg
* @param {object} error standard node.js or created with new Error ('')
* @param {string} [functionName] name of calling function
*
* Method:
* 1. Is the error a standard nodejs error? Indicator: .code exists
* nodejs provides an error object with properties: .code, .message .name .stack
* See https://nodejs.org/api/errors.html for more about the error object.
* .code provides the best information.
* See https://nodejs.org/api/errors.html#errors_common_system_errors
*
* 2. Is the error thrown in node-sonos - service _request? Indicator: .message starts with NODE_SONOS_ERRORPREFIX
* see https://github.com/bencevans/node-sonos/blob/master/lib/services/Service.js Service.prototype._request
* The .message then contains either NODE_SONOS_ERRORPREFIX statusCode 500 &amp; upnpErrorCode ' and the error.response.data
* or NODE_SONOS_ERRORPREFIX error.message and /// and error.response.data
*
* 3. Is the error from this package? Indicator: .message starts with NRCSP_ERRORPREFIX
*
* 4. All other error throw inside all modules (node-sonos, axio, ...)
*
* @throws nothing
*
* @returns nothing
*/

failure: (node, msg, error, functionName) => {
// 1. Is the error a standard nodejs error? Indicator: .code exists
// nodejs provides an error object with properties: .code, .message .name .stack
// See https://nodejs.org/api/errors.html for more about the error object.
// .code provides the best information.
// See https://nodejs.org/api/errors.html#errors_common_system_errors
//
// 2. Is the error thrown in node-sonos - service _request? Indicator: .message starts with NODE_SONOS_ERRORPREFIX
// see https://github.com/bencevans/node-sonos/blob/master/lib/services/Service.js Service.prototype._request
// The .message then contains either NODE_SONOS_ERRORPREFIX statusCode 500 &amp; upnpErrorCode ' and the error.response.data
// or NODE_SONOS_ERRORPREFIX error.message and /// and error.response.data
//
// 3. Is the error from this package? Indicator: .message starts with NRCSP_ERRORPREFIX
//
// 4. All other error throw inside all modules (node-sonos, axio, ...)
node.debug(`Entering error handling from ${functionName}.`)
let msgShort = 'unknown' // default text used for status message
let msgDetails = 'unknown' // default text for error message in addition to msgShort
Expand Down Expand Up @@ -234,7 +235,7 @@ <h1 class="page-title">Source: Helper.js</h1>
* @param {string} propertyMeaning additional information, including in error message
* @param {string} packageName package name, included in error message
*
* @returns{boolean} true/false if msg.property is "on/off" ! not case sensitive
* @returns {boolean} true/false if msg.property is "on/off" ! not case sensitive
*
* @throws {error} if msg[propertyName] is missing, not string, not on|off (NOT case sensitive)
*/
Expand Down Expand Up @@ -382,6 +383,8 @@ <h1 class="page-title">Source: Helper.js</h1>
* @param {array&lt;string>} path property chain- must not be empty
*
* @returns {boolean} property is accessible
*
* @throws nothing
*/
isValidProperty: (nestedObj, pathArray) => {
const property = pathArray.reduce(
Expand All @@ -396,6 +399,10 @@ <h1 class="page-title">Source: Helper.js</h1>
*
* @param {object} nestedObj object
* @param {array&lt;string>} path path property chain- must not be empty
*
* @returns {boolean} property is accessible and not empty string
*
* @throws nothing
*/
isValidPropertyNotEmptyString: (nestedObj, pathArray) => {
const property = pathArray.reduce(
Expand Down Expand Up @@ -482,7 +489,6 @@ <h1 class="page-title">Source: Helper.js</h1>
*
* @throws nothing
*/

getErrorCodeFromEnvelope: data => {
let errorCode = '' // default
if (module.exports.isTruthyAndNotEmptyString(data)) {
Expand Down Expand Up @@ -540,7 +546,7 @@ <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-He
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Sat Nov 21 2020 12:31:05 GMT+0100 (Central European Standard Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Sat Nov 21 2020 12:55:50 GMT+0100 (Central European Standard Time)
</footer>

<script> prettyPrint(); </script>
Expand Down
2 changes: 1 addition & 1 deletion docs/Soap.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-He
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Sat Nov 21 2020 12:31:05 GMT+0100 (Central European Standard Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Sat Nov 21 2020 12:55:50 GMT+0100 (Central European Standard Time)
</footer>

<script> prettyPrint(); </script>
Expand Down
2 changes: 1 addition & 1 deletion docs/Sonos-Commands.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -1064,7 +1064,7 @@ <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-He
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Sat Nov 21 2020 12:31:05 GMT+0100 (Central European Standard Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Sat Nov 21 2020 12:55:50 GMT+0100 (Central European Standard Time)
</footer>

<script> prettyPrint(); </script>
Expand Down
2 changes: 1 addition & 1 deletion docs/global.html
Original file line number Diff line number Diff line change
Expand Up @@ -732,7 +732,7 @@ <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-He
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Sat Nov 21 2020 12:31:05 GMT+0100 (Central European Standard Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Sat Nov 21 2020 12:55:50 GMT+0100 (Central European Standard Time)
</footer>

<script> prettyPrint(); </script>
Expand Down
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-He
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Sat Nov 21 2020 12:31:05 GMT+0100 (Central European Standard Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Sat Nov 21 2020 12:55:50 GMT+0100 (Central European Standard Time)
</footer>

<script> prettyPrint(); </script>
Expand Down
Loading

0 comments on commit a6c5b3c

Please sign in to comment.