History

python/lib/gen_code.py: fix error string

Paul Brossier committed 10 years ago

Commit 2ee90df1 parent a1389751 file · +1 −5Browse files

Showing the changes to python/lib/gen_code.py (1 of 1 file). Show all

Unified · Split

python/lib/gen_code.py+1−5
@@ -299,11 +299,7 @@ Py_{shortname}_init (Py_{shortname} * self, PyObject * args, PyObject * kwds) · 298 unmodified lines
299299 out += """
300300 // return -1 and set error string on failure
301301 if (self->o == NULL) {{
302− //char_t errstr[30 + strlen(self->uri)];
303− //sprintf(errstr, "error creating {shortname} with params {paramchars}", {paramvals});
304− char_t errstr[60];
305− sprintf(errstr, "error creating {shortname} with given params");
306− PyErr_SetString (PyExc_Exception, errstr);
302+ PyErr_Format (PyExc_Exception, "failed creating {shortname}");
307303 return -1;
308304 }}
309305 """.format(paramchars = paramchars, paramvals = paramvals, **self.__dict__)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t