Skip to main content
August 4, 2009
Answered

Exception handling with FU4

  • August 4, 2009
  • 1 reply
  • 1332 views

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 has been closed for replies.
Correct answer mlabriola

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
August 4, 2009

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