<?php
namespace devmo\controllers;
/**
 * Default base controller for creating the wrapper around errors
 *
 * @category Framework
 * @author Dan Wager
 * @copyright Copyright (c) 2007 Devmo
 * @version 1.0
 */
class Error extends \devmo\controllers\Controller {
	public $exception;

  public function run (array $args=null) {
		// log it
    $message = "Error:";
		foreach ($args as $k=>$v)
			$message .= " {$k}:{$v}";
    // build wrapper
		$view = null;
		if (Config::isCli()) {
			$view = $this->getView('devmo.echo');
			$view->string = $this->exception;
		} else {
			$error = $this->getView("devmo.views.{$this->exception->name}Error",$args);
			$view = $this->getView('devmo.views.Error',array('body'=>$error,'trace'=>$this->exception->__toViewString()));
			$view = $this->runController('devmo.SiteWrapper',array('title'=>'Problems!','body'=>$view));
		}
		return $view;
  }

	public function setException ($exception) {
		$this->exception = $exception;
	}

}

<?php
namespace devmo\controllers;
/**
 * Default base controller for creating the wrapper around errors
 *
 * @category Framework
 * @author Dan Wager
 * @copyright Copyright (c) 2007 Devmo
 * @version 1.0
 */
class Error extends \devmo\controllers\Controller {
	public $exception;

  public function run (array $args=null) {
		// log it
    $message = "Error:";
		foreach ($args as $k=>$v)
			$message .= " {$k}:{$v}";
    // build wrapper
    $error = $this->getView("devmo.views.{$this->exception->name}Error",$args);
    $view = $this->getView('devmo.views.Error',array('body'=>$error,'trace'=>$this->exception->__toViewString()));
    $wrap = $this->runController('devmo.SiteWrapper',array('title'=>'Problems!','body'=>$view));
    return $wrap;
  }

	public function setException ($exception) {
		$this->exception = $exception;
	}

}

Revert "modified error controller to be cli sensitive"
Revert "modified error controller to be cli sensitive"

This reverts commit 979ba31da56aa2355294435f28698998d0a96574.
