| 784 | } |
| 785 | |
| 786 | const char * FileRules::getCustomKeyValue(size_t ruleIndex, size_t key) const |
| 787 | { |
| 788 | m_impl->validatePosition(ruleIndex, Impl::DEFAULT_ALLOWED); |
| 789 | try |
| 790 | { |
| 791 | return m_impl->m_rules[ruleIndex]->m_customKeys.getValue(key); |
| 792 | } |
| 793 | catch (Exception & e) |
| 794 | { |
| 795 | std::ostringstream oss; |
| 796 | oss << "File rules: the custom key access for file rule '" |
| 797 | << std::string(m_impl->m_rules[ruleIndex]->getName()) |
| 798 | << "' failed: " << e.what(); |
| 799 | throw Exception(oss.str().c_str()); |
| 800 | } |
| 801 | } |
| 802 | |
| 803 | void FileRules::setCustomKey(size_t ruleIndex, const char * key, const char * value) |
| 804 | { |