tschneidereit / SwiftSuspenders

NOTE: Find the offical repo at http://github.com/robotlegs/swiftsuspenders
https://github.com/robotlegs/swiftsuspenders
MIT License
280 stars 89 forks source link

Attempting to instantiate() an interface should throw an informative error #37

Closed robertpenner closed 13 years ago

robertpenner commented 13 years ago

I made the mistake of trying to call injector.instantiate(IThing) instead of on Thing. The error message from Flash Player wasn't obvious at first:

VerifyError: Error #1001: The method asunit.framework::IRunnerFactory() is not implemented.

It would be nice if SwiftSuspenders could detect the interface and throw an informative error.

tschneidereit commented 13 years ago

Added meaningful exception for attempts at treating interfaces as instantiatable

Closed by 42d961247fd095255cf413ed6fd651765e50c5b4