<commit_before><?php namespace Lamoni\RESTLyte\RESTLyteRequest;

/**
 * Class RESTLyteRequestXML
 * @package Lamoni\RESTLyte\RESTLyteRequest
 */
class RESTLyteRequestXML extends RESTLyteRequestAbstract
{

    /**
     * Parses our $this->response into a new SimpleXMLElement() object
     *
     * @param array $customArgs
     * @return mixed
     */
    public function getResponse(array $customArgs=[])
    {
        $defaultCustomArgs = [
            'options'=>0,
            'dataIsURL'=>false,
            'namespace'=>"",
            'isPrefix'=>false
        ];

        $customArgs = array_merge($defaultCustomArgs, $customArgs);

        extract($customArgs);

        try {
            $xmlResponse = @new \SimpleXMLElement($this->response, $options, $dataIsURL, $namespace, $isPrefix);
        } catch(\Exception $e) {

            return $this->response;
        }
        if (count(libxml_get_errors())) {

            throw new \Exception("Unable to parse XML: " . libxml_get_errors());

        }

        return $xmlResponse;

    }

}<commit_msg>Reverted back to no try/catch in getResponse<commit_after><?php namespace Lamoni\RESTLyte\RESTLyteRequest;

/**
 * Class RESTLyteRequestXML
 * @package Lamoni\RESTLyte\RESTLyteRequest
 */
class RESTLyteRequestXML extends RESTLyteRequestAbstract
{

    /**
     * Parses our $this->response into a new SimpleXMLElement() object
     *
     * @param array $customArgs
     * @return mixed
     */
    public function getResponse(array $customArgs=[])
    {
        $defaultCustomArgs = [
            'options'=>0,
            'dataIsURL'=>false,
            'namespace'=>"",
            'isPrefix'=>false
        ];

        $customArgs = array_merge($defaultCustomArgs, $customArgs);

        extract($customArgs);

        $xmlResponse = new \SimpleXMLElement($this->response, $options, $dataIsURL, $namespace, $isPrefix);

        if (count(libxml_get_errors())) {

            throw new \Exception("Unable to parse XML: " . libxml_get_errors());

        }

        return $xmlResponse;

    }

}
{'fraction_non_alphanumeric': 0.12312166747455162, 'fraction_numerical': 0.0009694619486185168, 'mean_word_length': 2.457286432160804, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 16, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 8}, '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': '4996216', 'n_tokens_mistral': 630, 'n_tokens_neox': 584, 'n_words': 121}