Show specific error on property line found before :PROPERTIES: one.
This commit is contained in:
parent
b2779dbc41
commit
ffd82c2d76
@ -1029,7 +1029,15 @@ class OrgDomReader:
|
||||
elif as_time := parse_org_time(value):
|
||||
value = as_time
|
||||
|
||||
self.current_drawer.append(Property(linenum, match, key, value, None))
|
||||
try:
|
||||
self.current_drawer.append(Property(linenum, match, key, value, None))
|
||||
except:
|
||||
if "current_drawer" not in dir(self): # Throw a better error on this case
|
||||
raise Exception(
|
||||
"Found properties before :PROPERTIES: line. Error on Org file?"
|
||||
)
|
||||
else:
|
||||
raise # Let the exception pass
|
||||
|
||||
def read(self, s, environment):
|
||||
lines = s.split("\n")
|
||||
|
Loading…
Reference in New Issue
Block a user