File tree Expand file tree Collapse file tree 1 file changed +15
-8
lines changed
Expand file tree Collapse file tree 1 file changed +15
-8
lines changed Original file line number Diff line number Diff line change @@ -115,11 +115,18 @@ def from_txt(doc: Documentation) -> spec.Function:
115115
116116
117117def documentation_to_specification (doc : Documentation ) -> spec .Function :
118- if doc .source == Source .ArkScript :
119- return from_ark (doc )
120- elif doc .source == Source .Cpp :
121- return from_cpp (doc )
122- elif doc .source == Source .Txt :
123- return from_txt (doc )
124- else :
125- raise NotImplementedError
118+ try :
119+ if doc .source == Source .ArkScript :
120+ return from_ark (doc )
121+ elif doc .source == Source .Cpp :
122+ return from_cpp (doc )
123+ elif doc .source == Source .Txt :
124+ return from_txt (doc )
125+ except ValueError as e :
126+ logger .error (f"While parsing file { doc .source } , got an error" )
127+ try :
128+ logger .error (str (doc ))
129+ except Exception :
130+ logger .warn ("Couldn't print the signature of the function" )
131+ raise e
132+ raise NotImplementedError
You can’t perform that action at this time.
0 commit comments