0

When browsers encounters errors in scripts, they do a pretty decent job of showing the programmer where the error is and what the error is about.

I'm using the QUnit test framework, and it seems to be catching some of these browser errors, and replacing their error messages with super uninformative ones.

For instance, currently I apparently have a script error on line 0 (according to QUnit), but, as I'm using Browserify, my line 0 is fully autogenerated, and I have never had issues with this line before:

(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){

This is the error message that QUnit gives:

enter image description here

If indeed QUnit catches some of the browser errors, and replaces their error messages with super uninformative ones, then, why is this so, and how can I stop it?

  • but I don't use remote scripts.. all my code is installed locally as NPM packages. Also, I'm only messing around with my own local algorithms when this error occurs. No network shenanigans. So I'm not sure if it really can be the same error? I do have three.js loading a texture from my harddrive. Could that cause the problem? Though I haven't been fiddling with that functionality recently. EDIT: it worked!! Though I have no idea why my code is cross origin :/ –  Sep 07 '16 at 18:16
  • 1
    Not sure why sir... But that error is common with QUnit. :P – Jordan Kasper Sep 07 '16 at 20:37

0 Answers0