protected function exceptionToResult(\Exception $e) {
		if ( !$this->showerror )
			return null;
		elseif ( $this->showtrace )
			return array('error' => $e->getMessage(), 'trace' => errorTrace($e));
		else
			return array('error' => $e->getMessage());
	}