Skip to content

Commit 52f3c2c

Browse files
committed
skip file message: format everything in one call
I noticed that some logs reporting skip file messages seemed to interleave multiple messages: That's not terribly surprising due to concurrency. This changes the message formatting a bit & does it all in one method call to avoid the threading issues.
1 parent 371a7cf commit 52f3c2c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/cc/engine/analyzers/analyzer_base.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ def initialize(engine_config:)
1818
def run(file)
1919
process_file(file)
2020
rescue *RESCUABLE_ERRORS => ex
21-
$stderr.puts("Skipping file #{file} due to exception:")
22-
$stderr.puts("(#{ex.class}) #{ex.message} #{ex.backtrace.join("\n")}")
21+
$stderr.puts("Skipping file #{file} due to exception (#{ex.class}): #{ex.message}\n#{ex.backtrace.join("\n")}")
2322
rescue => ex
2423
$stderr.puts("#{ex.class} error occurred processing file #{file}: aborting.")
2524
raise ex

0 commit comments

Comments
 (0)