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:
mhammond%skippinet.com.au
2006-11-09 04:20:47 +00:00
parent 63efc8703b
commit 5f49ed82bf

View File

@@ -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) {