add exceptions to js and make invalid session access fatal + exception for a try/catch

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5443 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale committed 2007-06-22 19:59:57 +00:00
1 parent 6f78befac9
commit 5f86cb4606
4 files changed
+19 -6

No files matched your search

@@ -433,6 +433,7 @@ static JSBool odbc_setProperty(JSContext * cx, JSObject * obj, jsval id, jsval *
char *name = JS_GetStringBytes(JS_ValueToString(cx, id));
if (strcmp(name, "_oDbC_dB_RoW_DaTa_")) {
eval_some_js("~throw new Error(\"this property cannot be changed!\");", cx, obj, vp);
*vp = BOOLEAN_TO_JSVAL(JS_FALSE);
}
return JS_TRUE;