Change con.err() to con.error() #259
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi Bob,
When trying to set
Info = {
...
console: window.console,
...
}
I got an error after launching jalviewjs:
TypeError: con.err is not a function loading file swingjs/j2s/java/lang/Class.js
TypeError: con.err is not a function
at Con.consoleOutput (file://.../site/swingjs/swingjs2.js:16966:11)
at file://.../site/swingjs/swingjs2.js:17302:33
at ...
.
It looks like it should be error(s): this PR changes it in two files.
There is a workaround of defining con.err(s) with
window.console.err = function() {
this.error.apply(this,arguments);
}
but presumably better to fix at source.
Ben
P.S. The context of this is piping the sysoutdiv output to shell STDERR of chromium running in headless mode so that we can look for specific output of JalviewJS to detect launch, or other operations:
mkdir -p /tmp/chrome/TEMP
touch "/tmp/chrome/TEMP/First Run"
chrome
--headless=new
--timeout=15000
--virtual-time-budget=15000
--user-data-dir=/tmp/chrome
--profile-directory=TEMP
--allow-file-access-from-files
--enable-logging=stderr
./site/launcher_with_window_console.html