Modules

Kohana_Request_Exception
extends Kohana_Exception
extends Exception

package
Kohana
category
Exceptions
author
Kohana Team
copyright
© 2009-2010 Kohana Team
license
http://kohanaframework.org/license

Class declared in SYSPATH/classes/kohana/request/exception.php on line 9.

Properties

protected $code

protected $file

protected $line

protected $message

Methods

public __construct( string $message [, array $variables = NULL , integer|string $code = integer 0 ] ) (defined in Kohana_Exception)

Creates a new translated exception.

throw new Kohana_Exception('Something went terrible wrong, :user',
    array(':user' => $user));

Parameters

  • string $message required - Error message
  • array $variables = NULL - Translation variables
  • integer|string $code = integer 0 - The exception code

Return Values

  • void

Source Code

public function __construct($message, array $variables = NULL, $code = 0)
{
	// Set the message
	$message = __($message, $variables);

	// Pass the message and integer code to the parent
	parent::__construct($message, (int) $code);

	// Save the unmodified code
	// @link http://bugs.php.net/39615
	$this->code = $code;
}

public __toString( ) (defined in Kohana_Exception)

Magic object-to-string method.

echo $exception;

Tags

Return Values

  • string

Source Code

public function __toString()
{
	return Kohana::exception_text($this);
}

final public getCode( ) (defined in Exception)

final public getFile( ) (defined in Exception)

final public getLine( ) (defined in Exception)

final public getMessage( ) (defined in Exception)

final public getPrevious( ) (defined in Exception)

final public getTrace( ) (defined in Exception)

final public getTraceAsString( ) (defined in Exception)

final private __clone( ) (defined in Exception)