diff --git a/tests/ctx_lifetime.phpt b/tests/ctx_lifetime.phpt index 8c9f379..98f1b8a 100644 --- a/tests/ctx_lifetime.phpt +++ b/tests/ctx_lifetime.phpt @@ -46,7 +46,7 @@ object(V8Object)#%d (0) { } string(55) "Can't access V8Object after V8Js instance is destroyed!" -Warning: Uncaught exception 'V8JsScriptException' with message 'Can't access V8Object after V8Js instance is destroyed!' in %s%etests%ectx_lifetime.php:35 +Warning: Uncaught exception 'V8JsException' with message 'Can't access V8Object after V8Js instance is destroyed!' in %s%etests%ectx_lifetime.php:35 Stack trace: #0 %s%etests%ectx_lifetime.php(35): unknown() #1 {main} diff --git a/tests/direct_construct.phpt b/tests/direct_construct.phpt index 89d83c0..c4208d4 100644 --- a/tests/direct_construct.phpt +++ b/tests/direct_construct.phpt @@ -9,12 +9,12 @@ Test V8::executeString() : direct construction is prohibited echo "-- NOT ALLOWED --\n"; try { $a = new V8Object; -} catch (V8JsScriptException $e) { +} catch (V8JsException $e) { var_dump($e->getMessage()); } try { $a = new V8Function; -} catch (V8JsScriptException $e) { +} catch (V8JsException $e) { var_dump($e->getMessage()); } @@ -30,12 +30,12 @@ var_dump($f); echo "-- NOT ALLOWED --\n"; try { $oo = new $o(); -} catch (V8JsScriptException $e) { +} catch (V8JsException $e) { var_dump($e->getMessage()); } try { $ff = new $f; -} catch (V8JsScriptException $e) { +} catch (V8JsException $e) { var_dump($e->getMessage()); } diff --git a/tests/has_property_after_dispose.phpt b/tests/has_property_after_dispose.phpt index 7c0ea3c..02ee623 100644 --- a/tests/has_property_after_dispose.phpt +++ b/tests/has_property_after_dispose.phpt @@ -26,7 +26,7 @@ unset($v8); try { var_dump(property_exists($foo->x, 'bla')); } -catch(V8JsScriptException $e) { +catch(V8JsException $e) { var_dump($e->getMessage()); } ?> diff --git a/tests/use_after_dispose.phpt b/tests/use_after_dispose.phpt index 9981ea4..ac927ca 100644 --- a/tests/use_after_dispose.phpt +++ b/tests/use_after_dispose.phpt @@ -26,7 +26,7 @@ unset($v8); try { var_dump($foo->x); } -catch(V8JsScriptException $e) { +catch(V8JsException $e) { var_dump($e->getMessage()); } ?> diff --git a/tests/v8_unset_property.phpt b/tests/v8_unset_property.phpt index c69f095..a725286 100644 --- a/tests/v8_unset_property.phpt +++ b/tests/v8_unset_property.phpt @@ -21,7 +21,7 @@ try { // unset not valid, if $v8 object is disposed unset($a->bla); } -catch(V8JsScriptException $e) { +catch(V8JsException $e) { var_dump($e->getMessage()); } ?> diff --git a/tests/v8_write_property.phpt b/tests/v8_write_property.phpt index 4c84756..41f13f3 100644 --- a/tests/v8_write_property.phpt +++ b/tests/v8_write_property.phpt @@ -21,7 +21,7 @@ try { // writing not valid, if $v8 object is disposed $a->bla = 5; } -catch(V8JsScriptException $e) { +catch(V8JsException $e) { var_dump($e->getMessage()); } ?> diff --git a/v8js.cc b/v8js.cc index 8d9cb75..3caa8f0 100644 --- a/v8js.cc +++ b/v8js.cc @@ -164,7 +164,7 @@ static int php_v8js_v8_has_property(zval *object, zval *member, int has_set_exis php_v8js_object *obj = (php_v8js_object *) zend_object_store_get_object(object TSRMLS_CC); if (!obj->ctx) { - zend_throw_exception(php_ce_v8js_script_exception, + zend_throw_exception(php_ce_v8js_exception, "Can't access V8Object after V8Js instance is destroyed!", 0 TSRMLS_CC); return retval; } @@ -229,7 +229,7 @@ static zval *php_v8js_v8_read_property(zval *object, zval *member, int type ZEND php_v8js_object *obj = (php_v8js_object *) zend_object_store_get_object(object TSRMLS_CC); if (!obj->ctx) { - zend_throw_exception(php_ce_v8js_script_exception, + zend_throw_exception(php_ce_v8js_exception, "Can't access V8Object after V8Js instance is destroyed!", 0 TSRMLS_CC); ALLOC_INIT_ZVAL(retval); return retval; @@ -279,7 +279,7 @@ static void php_v8js_v8_write_property(zval *object, zval *member, zval *value Z php_v8js_object *obj = (php_v8js_object *) zend_object_store_get_object(object TSRMLS_CC); if (!obj->ctx) { - zend_throw_exception(php_ce_v8js_script_exception, + zend_throw_exception(php_ce_v8js_exception, "Can't access V8Object after V8Js instance is destroyed!", 0 TSRMLS_CC); return; } @@ -304,7 +304,7 @@ static void php_v8js_v8_unset_property(zval *object, zval *member ZEND_HASH_KEY_ php_v8js_object *obj = (php_v8js_object *) zend_object_store_get_object(object TSRMLS_CC); if (!obj->ctx) { - zend_throw_exception(php_ce_v8js_script_exception, + zend_throw_exception(php_ce_v8js_exception, "Can't access V8Object after V8Js instance is destroyed!", 0 TSRMLS_CC); return; } @@ -396,7 +396,7 @@ static HashTable *php_v8js_v8_get_properties(zval *object TSRMLS_DC) /* {{{ */ } if (!obj->ctx) { - zend_throw_exception(php_ce_v8js_script_exception, + zend_throw_exception(php_ce_v8js_exception, "Can't access V8Object after V8Js instance is destroyed!", 0 TSRMLS_CC); return NULL; } @@ -430,7 +430,7 @@ static zend_function *php_v8js_v8_get_method(zval **object_ptr, char *method, in zend_function *f; if (!obj->ctx) { - zend_throw_exception(php_ce_v8js_script_exception, + zend_throw_exception(php_ce_v8js_exception, "Can't access V8Object after V8Js instance is destroyed!", 0 TSRMLS_CC); return NULL; } @@ -472,7 +472,7 @@ static int php_v8js_v8_call_method(char *method, INTERNAL_FUNCTION_PARAMETERS) / obj = (php_v8js_object *) zend_object_store_get_object(object TSRMLS_CC); if (!obj->ctx) { - zend_throw_exception(php_ce_v8js_script_exception, + zend_throw_exception(php_ce_v8js_exception, "Can't access V8Object after V8Js instance is destroyed!", 0 TSRMLS_CC); return FAILURE; } @@ -529,7 +529,7 @@ static int php_v8js_v8_get_closure(zval *object, zend_class_entry **ce_ptr, zend php_v8js_object *obj = (php_v8js_object *) zend_object_store_get_object(object TSRMLS_CC); if (!obj->ctx) { - zend_throw_exception(php_ce_v8js_script_exception, + zend_throw_exception(php_ce_v8js_exception, "Can't access V8Object after V8Js instance is destroyed!", 0 TSRMLS_CC); return FAILURE; } @@ -609,7 +609,7 @@ static zend_object_value php_v8js_v8_new(zend_class_entry *ce TSRMLS_DC) /* {{{ */ PHP_METHOD(V8Object,__construct) { - zend_throw_exception(php_ce_v8js_script_exception, + zend_throw_exception(php_ce_v8js_exception, "Can't directly construct V8 objects!", 0 TSRMLS_CC); RETURN_FALSE; } @@ -619,7 +619,7 @@ PHP_METHOD(V8Object,__construct) */ PHP_METHOD(V8Function,__construct) { - zend_throw_exception(php_ce_v8js_script_exception, + zend_throw_exception(php_ce_v8js_exception, "Can't directly construct V8 objects!", 0 TSRMLS_CC); RETURN_FALSE; }