Skip to content

Commit

Permalink
[add] better http exception
Browse files Browse the repository at this point in the history
  • Loading branch information
elfarqy authored and haqqi committed Jan 25, 2017
1 parent a703c21 commit aa69d2b
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions common/exceptions/BetterHttpException.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php

namespace common\exceptions;

use yii\web\HttpException;

/**
* Class BetterHttpException
* @package common\exceptions
* @author Haqqi <haqqi@akupeduli.org>
*/
class BetterHttpException extends HttpException {
private $_data;

public function __construct($status, $message = null, $data = [], $code = 0, \Exception $previous = null) {
parent::__construct($status, $message, $code, $previous);
$this->_data = $data;
}

public function getData() {
return $this->_data;
}
}

0 comments on commit aa69d2b

Please sign in to comment.