99
99
raise MalformedHunkHeader("Does not start and end with @@.", line)
101
101
(orig, mod) = line[3:-4].split(" ")
103
103
raise MalformedHunkHeader(str(e), line)
104
104
if not orig.startswith('-') or not mod.startswith('+'):
105
105
raise MalformedHunkHeader("Positions don't start with + or -.", line)
107
107
(orig_pos, orig_range) = parse_range(orig[1:])
108
108
(mod_pos, mod_range) = parse_range(mod[1:])
110
110
raise MalformedHunkHeader(str(e), line)
111
111
if mod_range < 0 or orig_range < 0:
112
112
raise MalformedHunkHeader("Hunk range is negative", line)