chiark / gitweb /
jst-lower: Trap add_log_message to print to somewhere we can see
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 19 Jul 2021 02:22:53 +0000 (03:22 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 19 Jul 2021 18:29:54 +0000 (19:29 +0100)
commit2a70bd905903883df14291ce7e117a22777c182f
treed8942203cd70e7024ff513cbe02a2b3f0d591725
parent5a790f0f04ef9152841ee85f90e1cfc4832fd42a
jst-lower: Trap add_log_message to print to somewhere we can see

Otherwise, we just get an exception printed by nodejs which doesn't
actually include the message.

What we do here is print it to console.log where it will end up in
stderr, and *also* print a version to the machine-readable output
parsed by jst-lower.rs.

Currently jst-lower.rs bails on seeing it, which means these kind of
log messages are still fatal errors.  This is what we want - we don't
have any test cases that expect them.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
jstest/lower.nodejs