From 5f49ed82bfcb98a02a1bba60aac48611e86d9918 Mon Sep 17 00:00:00 2001 From: "mhammond%skippinet.com.au" Date: Thu, 9 Nov 2006 04:20:47 +0000 Subject: [PATCH] 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 --- mozilla/extensions/python/xpcom/src/PyIID.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mozilla/extensions/python/xpcom/src/PyIID.cpp b/mozilla/extensions/python/xpcom/src/PyIID.cpp index 39134827e03..ddcd8001fe1 100644 --- a/mozilla/extensions/python/xpcom/src/PyIID.cpp +++ b/mozilla/extensions/python/xpcom/src/PyIID.cpp @@ -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) {