<commit_before><?php
/**
 * This file is part of openvj project.
 *
 * Copyright 2013-2015 openvj dev team.
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace VJ\Core\Exception;

use VJ\Core\Application;

class UserException extends \Exception
{
    public function __construct($messageCode, $httpCode = 0, $placeholder = array())
    {
        parent::__construct(
            Application::get('i18n')->trans($messageCode, $placeholder), $httpCode
        );
    }
} <commit_msg>[vjframework] support reading raw error code from UserException<commit_after><?php
/**
 * This file is part of openvj project.
 *
 * Copyright 2013-2015 openvj dev team.
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace VJ\Core\Exception;

use VJ\Core\Application;

class UserException extends \Exception
{
    private $rawErrorCode;

    /**
     * @param string $messageCode
     * @param int $httpCode
     * @param array $placeholder
     */
    public function __construct($messageCode, $httpCode = 0, $placeholder = array())
    {
        $this->rawErrorCode = $messageCode;

        parent::__construct(
            Application::get('i18n')->trans($messageCode, $placeholder), $httpCode
        );
    }

    /**
     * @return string
     */
    public function getUserErrorCode()
    {
        return $this->rawErrorCode;
    }
} 
{'fraction_non_alphanumeric': 0.10941644562334217, 'fraction_numerical': 0.014588859416445624, 'mean_word_length': 3.03475935828877, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '4609211', 'n_tokens_mistral': 433, 'n_tokens_neox': 416, 'n_words': 129}