Prevent Stack Overflow Exception from crashing process

Assume I have an application, where user can provide script written in JavaScript to perform some task in it. This is done using Jint. However, badly written script can cause Stack Overflow Exception in JintEngine.Run() and therefore crashing whole application. I would rather like to inform user about the error in script.

I tried to run Jint on another application domain, that did not help, cause AFAIK default action on SOE is exiting process. Could be it changed any other way than by using CLR hosting?

I know I can run separate process and that's my fallback, nevertheless I would like not to do that.

5
задан konrad.kruczynski 9 February 2011 в 21:55
поделиться