original_string: public function exception($exception, $user_message=null) {
  	if ($exception instanceof \Exception == false) {
  		return $this->error('unknown exception format', response::STATUS_INTERNAL_SERVER_ERROR);
  	}
  	
  	$exception_class = bootstrap::get_library('exception');
  	
  	$this->data['exception']['current'] = $exception;
  	$this->data['exception']['current_trace_string'] = $exception_class::clean_paths(nl2br($exception->getTraceAsString()));
  	
  	$previous = $exception->getPrevious();
  	if ($previous) {
  		$this->data['exception']['previous'] = $previous;
  		$this->data['exception']['previous_trace_string'] = $exception_class::clean_paths(nl2br($previous->getTraceAsString()));
  	}
  	
  	$reason = $exception->getMessage();
  	$code   = $exception->getCode();
  	$this->error($reason, $code, $user_message);
  }
code: public function exception($exception, $user_message=null) {
  	if ($exception instanceof \Exception == false) {
  		return $this->error('unknown exception format', response::STATUS_INTERNAL_SERVER_ERROR);
  	}
  	
  	$exception_class = bootstrap::get_library('exception');
  	
  	$this->data['exception']['current'] = $exception;
  	$this->data['exception']['current_trace_string'] = $exception_class::clean_paths(nl2br($exception->getTraceAsString()));
  	
  	$previous = $exception->getPrevious();
  	if ($previous) {
  		$this->data['exception']['previous'] = $previous;
  		$this->data['exception']['previous_trace_string'] = $exception_class::clean_paths(nl2br($previous->getTraceAsString()));
  	}
  	
  	$reason = $exception->getMessage();
  	$code   = $exception->getCode();
  	$this->error($reason, $code, $user_message);
  }
code_tokens: public function exception ( $ exception , $ user_message = null ) { if ( $ exception instanceof \ Exception == false ) { return $ this -> error ( 'unknown exception format' , response :: STATUS_INTERNAL_SERVER_ERROR ) ; } $ exception_class = bootstrap :: get_library ( 'exception' ) ; $ this -> data [ 'exception' ] [ 'current' ] = $ exception ; $ this -> data [ 'exception' ] [ 'current_trace_string' ] = $ exception_class :: clean_paths ( nl2br ( $ exception -> getTraceAsString ( ) ) ) ; $ previous = $ exception -> getPrevious ( ) ; if ( $ previous ) { $ this -> data [ 'exception' ] [ 'previous' ] = $ previous ; $ this -> data [ 'exception' ] [ 'previous_trace_string' ] = $ exception_class :: clean_paths ( nl2br ( $ previous -> getTraceAsString ( ) ) ) ; } $ reason = $ exception -> getMessage ( ) ; $ code = $ exception -> getCode ( ) ; $ this -> error ( $ reason , $ code , $ user_message ) ; }
docstring: show an error page using an exception
  
  @param  object $exception    one that extends \Exception
  @param  string $user_message optional, human-friendly message to show to the user
  @return void                 script execution terminates
docstring_tokens: show an error page using an exception