throw exception when UrlManager is not properly configured in console mode.