/**
  * Creates and returns a new Exception instance.
  *
  * @param string $message The message itself
  * @param string $key The key for I18N
  * @return Faett_Manager_Exceptions_ChannelNotFoundException
  */
 public static function create($message, $key = '')
 {
     // create a new message
     $e = new Faett_Manager_Exceptions_ChannelNotFoundException($message);
     // set the message key
     $e->_setKey($key);
     // return the message
     return $e;
 }
 /**
  * Returns the channel for the passed package information.
  *
  * @param Faett_Manager_Package_Interfaces_Information
  * 		The package information to return the channel for
  * @return Faett_Channel_Model_Channel The requested channel instance
  * @throws Faett_Manager_Exceptions_ChannelNotFoundException
  * 		Is thrown if the channel of the package identifier was not registered
  */
 protected function _getChannel(Faett_Manager_Package_Interfaces_Information $information)
 {
     list($alias, $packageName) = explode('/', $information->getIdentifier());
     $channel = Mage::getModel('manager/channel')->loadByAlias($alias);
     // check if a channel for the package identifier was found
     if ($channel->getId() == null) {
         throw Faett_Manager_Exceptions_ChannelNotFoundException::create('Channel for alias ' . $alias . ' not registered');
     }
     // return the channel
     return $channel;
 }