yiisoft/yii2 — pull request #81 by toopay (2013-05-04 07:48:47+00:00)
Title: Throw exception if the app is not set [YiiBase::t()]

Current test suite are blocked by a [fatal error](https://travis-ci.org/toopay/yii2/jobs/6874059#L24). It seems that all component basically assumed the `$app` within `YiiBase` class always already setup, BEFORE anything else. Also, the fact that all exception classes within `base` directory, use `YiiBase::t` api directly, seems not right for me.

But ignoring all of above notes, the obvious options we have here were :
1. Make the `YiiBase::t` api works, even if the `$app` is not set yet (sprintf?)
2. Halt the execution and throw exception.

At this pull, i proposed to the second option.