If someone passes a bad IID string, raise a normal Python ValueError
rather than synthesizing an XPCOM error. Not part of the build git-svn-id: svn://10.0.0.236/trunk@215019 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -105,7 +105,7 @@ Py_nsIID::IIDFromPyObject(PyObject *ob, nsIID *pRet) {
|
||||
if (PyString_Check(ob)) {
|
||||
ok = iid.Parse(PyString_AsString(ob));
|
||||
if (!ok) {
|
||||
PyXPCOM_BuildPyException(NS_ERROR_ILLEGAL_VALUE);
|
||||
PyErr_SetString(PyExc_ValueError, "The string is formatted as a valid nsID");
|
||||
return PR_FALSE;
|
||||
}
|
||||
} else if (ob->ob_type == &type) {
|
||||
|
||||
Reference in New Issue
Block a user