Better messages on common exceptions.
Not part of the build. git-svn-id: svn://10.0.0.236/trunk@115560 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -122,7 +122,12 @@ class _Interface:
|
||||
|
||||
class _Interfaces(_ComponentCollection):
|
||||
def _get_one(self, name):
|
||||
item = interfaceInfoManager.GetInfoForName(name)
|
||||
try:
|
||||
item = interfaceInfoManager.GetInfoForName(name)
|
||||
except xpcom.COMException, why:
|
||||
# Present a better exception message, and give a more useful error code.
|
||||
import nsError
|
||||
raise xpcom.COMException(nsError.NS_ERROR_NO_INTERFACE, "The interface '%s' does not exist" % (name,))
|
||||
return _Interface(item.GetName(), item.GetIID())
|
||||
|
||||
def _build_dict(self):
|
||||
|
||||
Reference in New Issue
Block a user