lib/libdolt/git/blame.rb in libdolt-0.15.0 vs lib/libdolt/git/blame.rb in libdolt-0.16.0

- old
+ new

@@ -17,10 +17,12 @@ #++ require "tzinfo" module Dolt module Git + class InvalidBlameFormat < Exception; end + class Blame attr_reader :chunks def initialize(chunks) @chunks = chunks @@ -51,9 +53,11 @@ chunks << chunk end end chunks + rescue Exception => error + raise InvalidBlameFormat.new("Failed parsing Procelain: #{error.message}") end def is_header?(line) line =~ /^[0-9a-f]{40} \d+ \d+ \d+$/ end