summaryrefslogtreecommitdiff
path: root/Zend/zend_exceptions.c
diff options
context:
space:
mode:
authorIlija Tovilo <ilija.tovilo@me.com>2020-04-09 22:36:37 +0200
committerIlija Tovilo <ilija.tovilo@me.com>2020-07-09 23:52:17 +0200
commit9fa1d1330138ac424f990ff03e62721120aaaec3 (patch)
treeca3550c82b86ccf844745fbe80c77134ed5cbef4 /Zend/zend_exceptions.c
parentc60d0dc2f41f1d4817414e37a39ae87c5677e31a (diff)
downloadphp-git-9fa1d1330138ac424f990ff03e62721120aaaec3.tar.gz
Implement match expression
RFC: https://wiki.php.net/rfc/match_expression_v2 Closes GH-5371.
Diffstat (limited to 'Zend/zend_exceptions.c')
-rw-r--r--Zend/zend_exceptions.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/Zend/zend_exceptions.c b/Zend/zend_exceptions.c
index 0103422f94..989d007102 100644
--- a/Zend/zend_exceptions.c
+++ b/Zend/zend_exceptions.c
@@ -40,6 +40,7 @@ ZEND_API zend_class_entry *zend_ce_argument_count_error;
ZEND_API zend_class_entry *zend_ce_value_error;
ZEND_API zend_class_entry *zend_ce_arithmetic_error;
ZEND_API zend_class_entry *zend_ce_division_by_zero_error;
+ZEND_API zend_class_entry *zend_ce_unhandled_match_error;
/* Internal pseudo-exception that is not exposed to userland. */
static zend_class_entry zend_ce_unwind_exit;
@@ -800,6 +801,10 @@ void zend_register_default_exception(void) /* {{{ */
zend_ce_division_by_zero_error->create_object = zend_default_exception_new;
INIT_CLASS_ENTRY(zend_ce_unwind_exit, "UnwindExit", NULL);
+
+ INIT_CLASS_ENTRY(ce, "UnhandledMatchError", NULL);
+ zend_ce_unhandled_match_error = zend_register_internal_class_ex(&ce, zend_ce_error);
+ zend_ce_unhandled_match_error->create_object = zend_default_exception_new;
}
/* }}} */