diff options
author | Robert Zorko <robertz@gurucue.com> | 2015-12-17 14:02:20 +0100 |
---|---|---|
committer | Robert Zorko <robertz@gurucue.com> | 2015-12-17 14:02:20 +0100 |
commit | 27d9966693bc88495617ba165f290c7f2e54abd0 (patch) | |
tree | c8c7854e8777f149bd6d41c4a42b2060f71e1f64 /js/codeq/comms.js | |
parent | a7fa6cfffebe3026198ad8beb0e06543d3503bb6 (diff) |
added 'use strict', coirrected some errors which were revealed by it and fixed the argument of the call of the wait function used in the reset function (core.js)
Diffstat (limited to 'js/codeq/comms.js')
-rw-r--r-- | js/codeq/comms.js | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/js/codeq/comms.js b/js/codeq/comms.js index 5e046b7..fcce6df 100644 --- a/js/codeq/comms.js +++ b/js/codeq/comms.js @@ -15,6 +15,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ (function () { + "use strict"; // ================================================================================ // Errors generated in this module // ================================================================================ @@ -22,7 +23,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ var BinaryMessageError = function (message) { var e = new Error(message); this.message = message; - if (e.stack) this.stack = e.stack; + if (e.stack) { + this.stack = e.stack; + } }; BinaryMessageError.prototype = new Error(); BinaryMessageError.prototype.name = 'BinaryMessageError'; @@ -32,12 +35,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ if (message instanceof Error) { e = message; this.message = 'Message parse error: ' + e.toString(); - } - else { + } else { e = new Error(message); this.message = message; } - if (e.stack) this.stack = e.stack; + if (e.stack) { + this.stack = e.stack; + } }; MessageParseError.prototype = new Error(); MessageParseError.prototype.name = 'MessageParseError'; |