dimuthu wrote:
Hi, I wrote a code that can raise exception from c++ xpcom and handle the exception in javascript. It is compiling well. but is not working. i.e. js never catch any exceptions*****my code for raise exception is like this (in short)**** nsCOMPtr<nsIExceptionService> xs = do_GetService(NS_EXCEPTIONSERVICE_CONTRACTID); nsCOMPtr<nsIExceptionManager> xm; xs->GetCurrentExceptionManager(getter_AddRefs(xm)); nsCOMPtr<nsIException> exception = MyException(); //this is my implementation // for nsIException xm-> SetCurrentException( exception);
What result code do you return from this function? I don't think that xpconnect will even ask exceptionservice about an exception unless you return a special error result code.
--BDS _______________________________________________ dev-tech-xpcom mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-xpcom
