seancorfield/fw1 — pull request #139 by marcins (2012-08-27 06:18:38+00:00)
Title: Only show the underlying error if the error occurs before the Framework is initialised

Changed the onError handler to check if the Framework is initialised, and if not go straight to the "failure" function with an additional parameter to let the developer know the error occurred prior to initialisation. This will reduce the issues people have where they don't realise their underlying error is below the framework error in this case.

Includes test cases!

Also changed the "writeOutput" calls to go through a one-line function so that a replacement can be injected during testing to verify output from the Framework.