Skip to main content
Aug 4, 2009 1:41 PM UTC
Answered

Exception handling with FU4

Hi

I don't manage to use the exception handling feature in FlexUnit 4.

* When I add the [Test(expects="myError")] before a test which does NOT throw an error, the test does not fail.

* When I add  the [Test(expects="myError")] before a test which throws a myError, the test fails when the error appears. Yet if I use a try/catch I can check that the catched error is of type myError.

This topic is closed to new replies. Start a new post to keep the conversation going.
mlabriolaCorrect answer
Participating Frequently
Aug 4, 2009 1:53 PM UTC

Change the word expects to expected

There was a documentation error in FlexUnit 4 Beta 1 and earlier. In the new version either the word 'expects' or 'expected' work, in the older version, you must use 'expected'

Mike

1 reply

mlabriolaCorrect answer
Participating Frequently
Aug 4, 2009 1:53 PM UTC

Change the word expects to expected

There was a documentation error in FlexUnit 4 Beta 1 and earlier. In the new version either the word 'expects' or 'expected' work, in the older version, you must use 'expected'

Mike

Translate