Skip to content

Commit 88540b0

Browse files
committed
Add getter methods of the python exception class
The code and message should be able to return. It keeps consistent with the API of C++. The naming conversion is also followed with ACT implementation rather than python PEP 8.
1 parent 794460e commit 88540b0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Source/buildbindingpython.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,12 @@ func buildDynamicPythonImplementation(componentdefinition ComponentDefinition, w
132132
w.Writeln(" if self._message:")
133133
w.Writeln(" return '%sException ' + str(self._code) + ': '+ str(self._message)", NameSpace)
134134
w.Writeln(" return '%sException ' + str(self._code)", NameSpace)
135+
w.Writeln(" ")
136+
w.Writeln(" def GetErrorCode(self):")
137+
w.Writeln(" return self._code")
138+
w.Writeln(" ")
139+
w.Writeln(" def GetErrorMessage(self):")
140+
w.Writeln(" return self._message")
135141
w.Writeln("")
136142

137143

0 commit comments

Comments
 (0)