opencascade.js
opencascade.js copied to clipboard
opencascade.full.js gets dumped on error
We're using this library in our project, and are really liking it so far. However, whenever an error occurs (e.g. no method error, undefined variable, etc), it looks like the entire opencascade.full.js
file gets dumped to the logs, which makes it incredibly hard to debug anything.
Here's some example output:
file:///project_path/node_modules/opencascade.js/dist/opencascade.full.js:9
var Module=typeof Module!="undefined"?Module:{};var readyPromiseResolve,readyPromiseReject;Module["ready"]=new
Promise(function(resolve,reject){readyPromiseResolve=resolve;readyPromiseReject=reject});var
moduleOverrides=Object.assign({},Module);var arguments_=[];var thisProgram="./this.program";var quit_=(status,toThrow)=
{throw toThrow};var ENVIRONMENT_IS_WEB=typeof window=="object";var ENVIRONMENT_IS_WORKER=typeof
importScripts=="function";var ENVIRONMENT_IS_NODE=typeof process=="object"&&typeof
process.versions=="object"&&typeof process.versions.node=="string";var scriptDirectory="";function locateFile(path
{if(Module["locateFile"]){return Module["locateFile"](path,scriptDirectory)}return scriptDirectory+path}var
read_,readAsync,readBinary,setWindowTitle;function logExceptionOnExit(e){if(e instanceof ExitStatus)return;let
toLog=e;err("exiting due to exception: "+toLog)}var fs;var nodePath;var requireNodeFS;if(ENVIRONMENT_IS_NODE
{if(ENVIRONMENT_IS_WORKER
{scriptDirectory=require("path").dirname(scriptDirectory)+"/"}else{scriptDirectory=__dirname+"/"}requireNodeFS=()=
{if(!nodePath){fs=require("fs");nodePath=require("path")}};read_=function shell_read(filename,binary)
...
Would really love if there's some way to get better messages...
Thanks!