<commit_before><?php

class DLException extends Exception {

    private $url;

    public function __construct($statusCode, $response, $url) {
        $this->code = $statusCode;
        $this->message = $response;
        $this->url = $url;
    }

    public function getUrl() {
        return $this->url;
    }
}

?><commit_msg>Added functionality for enhanced debug. Uses a combined object of request and respone that is created by an get debuginfo function within the client.<commit_after><?php

class DLException extends Exception {

    private $_errorType;
    private $_request;
    private $_response;

    public function __construct($debugObject) {
        $this->_code = $debugObject['response']['http_status'];
        $this->_errorType = $debugObject['body']['name'];
        $this->_message = $debugObject['body']['message'];
        $this->_request = $debugObject['request'];
        $this->_response = $debugObject['response'];
        $this->_response['body'] = $debugObject['body'];
    }

    public function getErrorMessage() {
        return $this->_errorType;
    }

    public function getRequest() {
        return $this->_request;
    }

    public function getResponse() {
        return $this->_response;
    }

    public function dumpContent() {
        var_dump($this);
    }
}

?>
{'fraction_non_alphanumeric': 0.13414634146341464, 'fraction_numerical': 0.0, 'mean_word_length': 2.9667673716012084, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 18, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3994423', 'n_tokens_mistral': 358, 'n_tokens_neox': 350, 'n_words': 91}