From 9a5ea19d85b5f7c2a3ea735b5bfac41e3cd714e1 Mon Sep 17 00:00:00 2001 From: Aleksandr Kuzmenko Date: Wed, 20 Dec 2023 10:05:17 +0300 Subject: [PATCH] Assert.exception: check if type is null (#127) --- src/utest/Assert.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utest/Assert.hx b/src/utest/Assert.hx index 8e7e57f..2d9f975 100644 --- a/src/utest/Assert.hx +++ b/src/utest/Assert.hx @@ -710,7 +710,7 @@ class Assert { } static function _raisesImpl(method:() -> Void, type:Any, condition : (Dynamic)->Bool, msgNotThrown : String , msgWrongType : String, pos : PosInfos) { - var typeDescr = "of type " + Type.getClassName(type); + var typeDescr = type == null ? '' : "of type " + Type.getClassName(type); inline function handleCatch(ex:Any):Bool { return if(null == type) { pass(pos);