change line endings
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
namespace BSR\Lib\Exception;
|
||||
|
||||
class BookNotFoundException extends WebException {
|
||||
public function __construct($code) {
|
||||
parent::__construct('BookNotFound', "The book with code $code was not found", -404);
|
||||
}
|
||||
}
|
||||
<?php
|
||||
|
||||
namespace BSR\Lib\Exception;
|
||||
|
||||
class BookNotFoundException extends WebException {
|
||||
public function __construct($code) {
|
||||
parent::__construct('BookNotFound', "The book with code $code was not found", -404);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace BSR\Lib\Exception;
|
||||
|
||||
/**
|
||||
* Exception raised when an invalid attribute name is accessed
|
||||
*/
|
||||
class InvalidAttributeException extends \Exception { }
|
||||
<?php
|
||||
|
||||
namespace BSR\Lib\Exception;
|
||||
|
||||
/**
|
||||
* Exception raised when an invalid attribute name is accessed
|
||||
*/
|
||||
class InvalidAttributeException extends \Exception { }
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace BSR\Lib\Exception;
|
||||
|
||||
class SqlException extends \Exception
|
||||
{
|
||||
private $query;
|
||||
|
||||
public function __construct($message = "Sql Error", $query = "")
|
||||
{
|
||||
$this->query = $query;
|
||||
parent::__construct($message, 0);
|
||||
}
|
||||
|
||||
public function getSqlError()
|
||||
{
|
||||
return $this->getMessage().' while executing: '.$this->query;
|
||||
}
|
||||
}
|
||||
<?php
|
||||
|
||||
namespace BSR\Lib\Exception;
|
||||
|
||||
class SqlException extends \Exception
|
||||
{
|
||||
private $query;
|
||||
|
||||
public function __construct($message = "Sql Error", $query = "")
|
||||
{
|
||||
$this->query = $query;
|
||||
parent::__construct($message, 0);
|
||||
}
|
||||
|
||||
public function getSqlError()
|
||||
{
|
||||
return $this->getMessage().' while executing: '.$this->query;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace BSR\Lib\Exception;
|
||||
|
||||
class WebException extends \Exception
|
||||
{
|
||||
private $excname;
|
||||
|
||||
/**
|
||||
* @param string $name
|
||||
* @param string $reason
|
||||
* @param int $code
|
||||
*/
|
||||
function __construct($name, $reason, $code)
|
||||
{
|
||||
$this->excname = $name;
|
||||
parent::__construct($reason, $code);
|
||||
}
|
||||
|
||||
public function getName()
|
||||
{
|
||||
return $this->excname;
|
||||
}
|
||||
}
|
||||
<?php
|
||||
|
||||
namespace BSR\Lib\Exception;
|
||||
|
||||
class WebException extends \Exception
|
||||
{
|
||||
private $excname;
|
||||
|
||||
/**
|
||||
* @param string $name
|
||||
* @param string $reason
|
||||
* @param int $code
|
||||
*/
|
||||
function __construct($name, $reason, $code)
|
||||
{
|
||||
$this->excname = $name;
|
||||
parent::__construct($reason, $code);
|
||||
}
|
||||
|
||||
public function getName()
|
||||
{
|
||||
return $this->excname;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user