Skip to content
Snippets Groups Projects
Commit bb365485 authored by Mohamed, Fawzi Roberto (fawzi)'s avatar Mohamed, Fawzi Roberto (fawzi)
Browse files

adding pwarn convenience method to the backend to log parser warnings

parent 9ae60718
Branches
Tags
No related merge requests found
......@@ -414,3 +414,7 @@ class ActiveBackend(object):
if converted is None:
raise Exception("ActiveBackend cannot convert to unit '{}'".format(unit))
return converted
def pwarn(self, msg):
"""Writes a parser warning message"""
self.addValue("parsing_message_warning_run", msg)
......@@ -240,6 +240,10 @@ class JsonParseEventsWriterBackend:
dtypeStr = metaInfo.dtypeStr
return numpy.zeros(shape, dtype = numpyDtypeForDtypeStr(dtypeStr))
def pwarn(self, msg):
"""Writes a parser warning message"""
self.addValue("parsing_message_warning_run", msg)
# testing
if __name__ == '__main__':
parser = JsonParseEventsWriterBackend(None)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment