aboutsummaryrefslogtreecommitdiff
path: root/lib/Minz/ActionException.php
blob: 3c08b48924b9ec5606c00355f7de7a8f32819d1a (plain)
1
2
3
4
5
6
7
8
9
10
<?php
class Minz_ActionException extends Minz_Exception {
	public function __construct(string $controller_name, string $action_name, int $code = self::ERROR) {
		// Just for security, as we are not supposed to get non-alphanumeric characters.
		$action_name = rawurlencode($action_name);

		$message = "Invalid action name “{$action_name}” for controller “{$controller_name}”.";
		parent::__construct ($message, $code);
	}
}