Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit da70485

Browse files
committed
Give type name when complaining about using input-only type for output
or v.v.
1 parent 0036cba commit da70485

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Tools/bgen/bgen/bgenType.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ class InputOnlyMixIn:
115115
"Mix-in class to boobytrap passOutput"
116116

117117
def passOutput(self, name):
118-
raise RuntimeError, "this type can only be used for input parameters"
118+
raise RuntimeError, "Type '%s' can only be used for input parameters" % self.typeName
119119

120120
class InputOnlyType(InputOnlyMixIn, Type):
121121

@@ -126,7 +126,7 @@ class OutputOnlyMixIn:
126126
"Mix-in class to boobytrap passInput"
127127

128128
def passInput(self, name):
129-
raise RuntimeError, "this type can only be used for output parameters"
129+
raise RuntimeError, "Type '%s' can only be used for output parameters" % self.typeName
130130

131131
class OutputOnlyType(OutputOnlyMixIn, Type):
132132

0 commit comments

Comments
 (0)