Change con.err() to con.error() - #259
Merged
Merged
Conversation
Owner
|
Yes thanks. This was fixed some time ago in SwingJS, just did not get
transmitted to Jalview.
…On Fri, Jun 9, 2023, 2:48 PM benzoid ***@***.***> wrote:
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
------------------------------
You can view, comment on, or merge this pull request online at:
#259
Commit Summary
- 28a4edb
<28a4edb>
Change con.err() to con.error()
File Changes
(2 files <https://github.com/BobHanson/java2script/pull/259/files>)
- *M* sources/net.sf.j2s.java.core/srcjs/js/j2sClazz.js
<https://github.com/BobHanson/java2script/pull/259/files#diff-4313952fb550cf2f93ee52a35a9e3228649472859da67d65249e4325736280cf>
(2)
- *M* sources/net.sf.j2s.java.core/srcjs/swingjs2.js
<https://github.com/BobHanson/java2script/pull/259/files#diff-6676e5f02d38c50b48417f416f2d0ff43f5b2f625ba2f91dacd688db80064a7f>
(2)
Patch Links:
- https://github.com/BobHanson/java2script/pull/259.patch
- https://github.com/BobHanson/java2script/pull/259.diff
—
Reply to this email directly, view it on GitHub
<#259>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEHNCW4I75NKTDP7AOLNBQLXKLS4TANCNFSM6AAAAAAZAMESEA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Owner
|
no actual change was done in this merge |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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