Added HTTP exception classes.

This commit is contained in:
Matt Butcher
2011-12-19 13:19:29 -06:00
parent 08f665b23b
commit 254e563f25
4 changed files with 41 additions and 0 deletions

14
src/HPCloud/Exception.php Normal file
View File

@@ -0,0 +1,14 @@
<?php
/**
* @file
* The parent exception class for HPCloud.
*/
namespace HPCloud;
/**
* The top-level HPCloud exception.
*
* In most cases, the library will throw a more finely
* grained exception, but all exceptions thrown directly
* by HPCloud will be an instance of this exception.
*/
class Exception extends \Exception {}

View File

@@ -0,0 +1,9 @@
<?php
/**
* @file
*/
namespace HPCloud\Transport;
/**
* Represents an HTTP 401.
*/
class AuthorizationException extends \HPCloud\Exception {}

View File

@@ -0,0 +1,9 @@
<?php
/**
* @file
*/
namespace HPCloud\Transport;
/**
* Represents an HTTP File Not Found error.
*/
class FileNotFoundException extends \HPCloud\Exception {}

View File

@@ -0,0 +1,9 @@
<?php
/**
* @file
*/
namespace HPCloud\Transport;
/**
* Represents an HTTP 500 error.
*/
class ServerException extends \HPCloud\Exception {}