diff --git a/tests/ScriptTests/BaseScriptClassTests.cpp b/tests/ScriptTests/BaseScriptClassTests.cpp index 8465daf..59dae2e 100644 --- a/tests/ScriptTests/BaseScriptClassTests.cpp +++ b/tests/ScriptTests/BaseScriptClassTests.cpp @@ -344,10 +344,15 @@ TEST_CASE("Handle script exceptions.") { auto mainLib = TestLibrary::GetLibrary(); auto script = GetScript(mainLib, "throwScript"_cnc); REQUIRE(script != nullptr); - CHECK_THROWS_WITH( - TryException(script), - Catch::Matchers::Equals("Script exception in script 'throwScript', line 1. Message: 'test exception'.")); - delete script; + try{ + TryException(script); + } + catch (const ArbUt::Exception& e){ + REQUIRE(strcmp(e.what(), "Script exception in script 'throwScript', line 1. Message: 'test exception'.") == 0); + delete script; + return; + } + throw ArbUt::Exception("Didn't throw"); } #endif \ No newline at end of file