lib/u3d/log_analyzer.rb in u3d-1.0.19 vs lib/u3d/log_analyzer.rb in u3d-1.0.20

- old
+ new

@@ -19,10 +19,11 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. ## --- END LICENSE BLOCK --- require 'json' +require 'u3d/failure_reporter' module U3d # Analyzes log by filtering output along a set of rules # rubocop:disable ClassLength, PerceivedComplexity, BlockNesting class LogAnalyzer @@ -195,9 +196,20 @@ if @active_rule # Active rule should be finished # If it is still active during phase change, it means that something went wrong context = @lines_memory.map { |l| "> #{l}" }.join('') UI.error("[#{@active_phase}] Could not finish active rule '#{@active_rule}'. Aborting it. Context:\n#{context}") + + U3d::FailureReporter.report( + failure_type: "PRETTIFIER", + failure_message: "Could not finish rule", + data: { + phase: @active_phase, + rule: @active_rule, + context: context.split("\n") + } + ) + @active_rule = nil end UI.verbose("--- Ending #{@active_phase} phase ---") @active_phase = nil @context.clear